Skip to content

[Productive] Write code with types after defining them in graphql schema first

veeramarni edited this page Jul 31, 2020 · 7 revisions
  1. Update the Graphql Schema first with required methods.

  2. Generate Graphql Types by running npm run genreateGraphql

  3. The generated code usually added to <@sample-stack>/core package and this package should be imported to use it. In order to auto build when the files changes in the package, make sure watch is run on that package.

  4. Write resolvers for the Mutations | Query | Subscription that are defined in the graphql schema.

The following video shows in-action https://youtu.be/F1UZdcpjx3w