openneuro icon indicating copy to clipboard operation
openneuro copied to clipboard

refactor(graphql): Generate types for GraphQL schemas

Open nellh opened this issue 4 years ago • 0 comments

Adds automatic type generation using graphql-codegen.

This is a work in progress because it requires giving queries and mutations unique names. I fixed openneuro-client but not the other packages to try things out.

TODO:

  • [ ] Fix all the overlapping/anonymous queries/mutations in the CLI and React packages.
  • [ ] Have CI verify the generated types match the committed version
  • [ ] Decide if we want to generate separate types for each package or just stick them all in @openneuro/client or a new utility package.
  • [ ] Document how to update types (pretty much just yarn codegen)

nellh avatar May 07 '21 05:05 nellh