graphjin icon indicating copy to clipboard operation
graphjin copied to clipboard

Document support for graphql spec

Open krish7919 opened this issue 3 years ago • 5 comments

Can we add a note in the docs somewhere where we mention if graphjin supports the full graphql spec?

Something similar to https://github.com/99designs/gqlgen/issues/760 but in the docs.

Use-case: this will be useful for new developers and prospective adopters to understand the trade-offs in case graphjin doesn't support the full spec!

krish7919 avatar Jan 18 '22 22:01 krish7919

Sure that makes sense. Our docs are an open wiki so anyone can make this update.

QUERY ✔️
MUTATION ✔️
SUBSCRIPTION ✔️ 
FIELD ✔️
FRAGMENT_DEFINITION ✔️
FRAGMENT_SPREAD ✔️
INLINE_FRAGMENT ✔️

dosco avatar Jan 19 '22 07:01 dosco

Does it support all the schema directives too?

krish7919 avatar Jan 19 '22 12:01 krish7919

The schema is auto generated from the database you can query it with an IntrospectionQuery kinda like in the linked gist. The web ui uses this introspection query. https://gist.github.com/craigbeck/b90915d49fda19d5b2b17ead14dcd6da

dosco avatar Jan 20 '22 05:01 dosco

@dosco any update on this? I get your earlier comment about docs are open source, but I do not know what to write there as I am unsure of what GraphJin supports (or does not support).

krish7919 avatar Sep 22 '22 00:09 krish7919

I'm not an expert in the schema stuff in short GraphJin is different from other GraphQL frameworks it does not allow you to define a schema. It auto-discovers your database and generates a schema and then from your GraphQL it auto generates SQL queries. As far I know it supports everything in the GraphQL spec and the generated schema uses almost all the schema directives as well. Here's the code that generates the GraphQL schema from the database schema

dosco avatar Sep 22 '22 02:09 dosco