Graphql-tools: Tag for schema definition

Created on 5 Sep 2016  路  4Comments  路  Source: ardatan/graphql-tools

Much like we have a gql tag for graphQL queries, if we have a special tag for graphQL schema definition (e.g. gqlschema, glqs, gs, gql.schema, whatever), we'll make it much easier for static analyzers and code editors to syntax highlight and help lint issues.

Most helpful comment

Would this be better or worse than a separate .graphql file type?

On the client, there's a need to co-locate the queries inside the UI code. On the server, it might be fine or even better to have a separate file?

All 4 comments

Do you have a particular use case for it? just curious what kinds of tools you might be using.

The main use-case I'm thinking of right now is syntax highlighting, similar to the need here https://github.com/apollostack/graphql-tools/issues/123#issuecomment-244824657

Would this be better or worse than a separate .graphql file type?

On the client, there's a need to co-locate the queries inside the UI code. On the server, it might be fine or even better to have a separate file?

Oh you are right. Separate files would actually be much better!

Was this page helpful?
0 / 5 - 0 ratings