Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[eas-cli] graphql codegen #70

Merged
merged 4 commits into from
Nov 18, 2020
Merged

[eas-cli] graphql codegen #70

merged 4 commits into from
Nov 18, 2020

Conversation

quinlanj
Copy link
Member

@quinlanj quinlanj commented Nov 18, 2020

what

Graphql codegen for schema types:

  • declared in www
  • queries and fragments declared in eas-cli

how

Setup is pretty much the same as what juwan configured in the website, minus the apollo plugins.

step by step

In packages/eas-cli, run yarn generate-graphql-code. This will generate agraphql/generated.tsx file, all the types from the www schema, along with the queries + fragments declared in eas-cli

Copy link
Contributor

@FiberJW FiberJW left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thumbs-up-00005

@quinlanj quinlanj merged commit f431fea into main Nov 18, 2020
@quinlanj quinlanj deleted the @quin/graphqlCodegen branch November 18, 2020 21:21
@dsokal
Copy link
Contributor

dsokal commented Nov 19, 2020

@quinlanj I've just noticed this. Do we want generated.tsx to have the .tsx extension? I guess x doesn't make sense for node.

@barthap
Copy link
Contributor

barthap commented Nov 26, 2020

Bump. Dominik is right, trying to import the generated.tsx causes TS error:

Module '../generated' was resolved to 'packages/eas-cli/src/graphql/generated.tsx', but '--jsx' is not set.
ts(6142)

EDIT: Fixed by #92

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants