Export of GraphQL Schema #2089
-
Is there anyway to export the graphQL schema that is being generated? Appreciate any feedback. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 8 replies
-
Hi @Bilal-S ! If you wish to get the If you wish to get the JSON introspection of the schema, you can use |
Beta Was this translation helpful? Give feedback.
-
@dotansimha Here the example:
While I was looking for something like SDL: Is there anyway to covert this? |
Beta Was this translation helpful? Give feedback.
Hi @Bilal-S !
Are you referring to the executable schema (
GraphQLSchema
), or to the SDL only?If you wish to get the
GraphQLSchema
instance, follow this: https://www.graphql-mesh.com/docs/getting-started/basic-example and usegetMesh
to get the executable schema.If you wish to get the JSON introspection of the schema, you can use
dump-schema
command, like that:yarn graphql-mesh dump-schema --output ./schema.json
(note, if you'll set the extension to.graphql
, you'll get SDL ;) )