Skip to content

How to use in combination with GraphQL Mesh #4015

Answered by ardatan
paales asked this question in General
Discussion options

You must be logged in to vote

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

schema: http://localhost:3000/api/graphql

### OR

Second, you can export schema and point to that file in codegen.yml.

schema.ts

const { schema } = await getMesh(...);
export default schema;

and in codegen.yml

require: ts-node/register
schema: ./schema.ts
...

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
1 reply
@ajibadeabd
Comment options

Answer selected by paales
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
3 participants