Skip to content

Locations of multiple schema files #5055

Answered by dotansimha
geekox86 asked this question in Q&A
Discussion options

You must be logged in to vote

Hi @geekox86 !
We recently found that we need something similar for this PR. We added includeSources: boolean flag to graphql-tools loaders, and it should already be available for you to use.

I think that doing something like that should work:

schema:
  - "./src/**/*.graphql": 
     includeSources: true

And then you can use the GraphQLSchema and access schema.extensions.sources to get the sources that created the schema.

Can you please try that and let me know how it works?

fyi @ardatan

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@geekox86
Comment options

@dotansimha
Comment options

Answer selected by geekox86
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants