Segregation of `src/data/queries` and `src/data/types` is contra-intuitive
See original GitHub issueToo wide (and falsy) segregation of GraphQL Types and Resolvers
The first example of this is new ObjectType
in src/data/queries/index.js
importing fields.
Fields should be taken in context of parent type, not as standalone information.
This can ensure some users that custom types cannot have own field resolvers which is false.
In fact, much of fields which can have own resolvers are handled level up (which is possible but not always desired) and makes thinking about GraphQL harder than it actually are.
There is place where I need collect all the opinion and experience. Please, comments are welcomed!
Issue Analytics
- State:
- Created 6 years ago
- Comments:17 (3 by maintainers)
Top Results From Across the Web
React Starter Kit - Bountysource
Segregation of `src/data/queries` and `src/data/types` is contra-intuitive $ 0 ... Too wide (and falsy) segregation of GraphQL Types and Resolvers.
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
Can I propose a rewrite of the example schema with graphql-tools a la https://github.com/kriasoft/react-starter-kit/issues/1379#issuecomment-324509512? This opens up the possibility of schema stitching and I believe also solves your problem pretty easily?
I’m still of the opinion that writing the schema in straight JS feels a little contra-intuitive.
What is too wide is the authorization, could use a query/mutation example with some sort of access control
@langpavel thank you very much for crating this issue! Unfortunately, we have close it due to inactivity. Feel free to re-open it or join our Discord channel for discussion.
NOTE: The
main
branch has been updated with React Starter Kit v2, using JAM-style architecture.