question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Segregation of `src/data/queries` and `src/data/types` is contra-intuitive

See original GitHub issue

Too 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:closed
  • Created 6 years ago
  • Comments:17 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
tim-softcommented, Oct 26, 2017

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

0reactions
ulanicommented, May 27, 2021

@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.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found