glennreyes / glennreyes/graphpack
support for structured GraphQL Schema
- Dominant language
- JavaScript
- Stars
- 2k
- Forks
- 77
- PR merge metrics
- No merged PRs in 30d
Description
Hi, it's a feature request not a bug.
I think GraphQL schema could be more flexible than now.
For now, I have to define all GraphQL schema and resolver to `schema.graphql`, `resolvers.js`. I know `resolvers` are more options but not enough.
My proper structure for GraphQL is like this. each entry has own definitions.
```
src/
├── definitions
│ ├── groot
│ │ ├── groot.resolvers.js
│ │ └── groot.graphql
│ └── hello
│ ├── hello.resolvers.js
│ └── hello.graphql
└── index.js
3 directories, 5 files
```
However, this structure is not worked with `graphqlpack`. [code sandbox](https://codesandbox.io/s/910qvoo4or) has following error message.
```
Error: Couldn't find any resolvers. Please add resolvers to your src/resolvers.js
at Module../node_modules/graphpack/lib/server.js
```
How about your thought on above GraphQL schema structure support?
I think `merge-graphql-schemas` can make things works easily. [this repository](https://github.com/vreality64/graphql-example) will show you how to use the `merge-graphql-schemas` and what the benefits are. 😃
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.