Allow passing in path to .graphql file for typeDefs
See original GitHub issueIn most scenarios, the type definitions for the server live in their own .graphql
file (best practices from the boilerplates). It would be convenient to pass in the file path, instead of having to load the file first, and pass in the contents to typeDefs
.
This could be implemented either as a separate parameter (typeDefsPath
?) or by reusing typeDefs
.
Issue Analytics
- State:
- Created 6 years ago
- Reactions:1
- Comments:5 (5 by maintainers)
Top Results From Across the Web
Allow passing in path to .graphql file for typeDefs #49 - GitHub
Regarding calling it typeDefs : Is there a reliable and inexpensive way to check whether the passed in string is a path or...
Read more >Modularizing your GraphQL schema code
Expanding on our previous example, here's our schema.js file with some resolvers added into the picture: // schema.js import { typeDef as Author...
Read more >How do I use schema.graphql file as typeDefs? - Stack Overflow
js and I am currently using graphql-yoga as a GraphQLServer. Now, I want to seperate Type Definitions and Resolvers so I have used...
Read more >Passing Arguments - GraphQL
Just like a REST API, it's common to pass arguments to an endpoint in a GraphQL API. By defining the arguments in the...
Read more >GraphQL + TypeScript - A progressive Node.js framework
To enable watch mode for the script (to automatically generate typings whenever any .graphql file changes), pass the watch option to the generate()...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@marktani fixed in https://github.com/hoodsy/graphcool-auth0-example/pull/2
typeDefs.endsWith('.graphql')
?