Skip to content

Conversation

jjangga0214
Copy link
Contributor

@jjangga0214 jjangga0214 commented Feb 3, 2020

Currently, there is a constraint that forces people to provide root query type.

However, IMHO, it's unnecessary.

Mutation-and-subscription-only GraphQL is also possible.

Therefore, I patched it, to allow queryless schema.

More fundamentally speaking, why should you restrict people's intentions?

You cannot predict every use case, as the world is a quite complex place for a limited personal experience and a single philosophy to foresee.

Give people freedom.

JUST LET PEOPLE BUILD WHAT THEY WANT.

Thanks.

@Cito
Copy link
Member

Cito commented Feb 3, 2020

I hate to be a naysayer, but GraphQL.js has been created as a reference implementation for GraphQL, so it needs to follow the specification which says that the type system must contain a query type. Also, I think it is already possible to skip the schema validation by passing assumeValid=true.

@IvanGoncharov
Copy link
Member

@Cito Thanks for the support 👍

@jjangga0214 I totally understand the frustration of being forced to add dummy field to Query type just to satisfy GraphQL specification.
That said as @Cito correctly pointed out we need to follow the spec so a way forward would be to first solve it in the spec.
Moreover, the proposal for this change is discussed here:
graphql/graphql-spec#631

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants