-
Hi there! Great software, really appreciated! We're building a NextJS website where we have created a /api/graphql endpoint with GraphQL Mesh. We've build the application in typescript. I can programmatically export the schema with the following typescript code: const { schema } = (async () => getMesh(await findAndParseConfig()))() Is there a way to hook this into Graphql Code Generator? Of course I'd like to keep the codegen.yml file instead of resorting to some programmatic method |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
GraphQL Mesh gives you a regular You have two options; First, you can just point to the URL
### OR Second, you can export schema.ts
and in codegen.yml
|
Beta Was this translation helpful? Give feedback.
-
I've got it working, had to do something like this, because my modules aren't in commonjs
In my codegen.yml
Thanks a lot for pushing me in the right direction! |
Beta Was this translation helpful? Give feedback.
GraphQL Mesh gives you a regular
GraphQLSchema
which can be used in GraphQL Code Generator without any extra configuration.You have two options;
First, you can just point to the URL
### OR
Second, you can export
schema
and point to that file incodegen.yml
.schema.ts
and in codegen.yml