Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[plugin-graphql] Allow .graphqls file extension #1027

Closed
IanVS opened this issue Oct 27, 2021 · 3 comments · Fixed by #1028
Closed

[plugin-graphql] Allow .graphqls file extension #1027

IanVS opened this issue Oct 27, 2021 · 3 comments · Fixed by #1028

Comments

@IanVS
Copy link
Contributor

IanVS commented Oct 27, 2021

  • Rollup Plugin Name: @rollup/plugin-graphql
  • Rollup Plugin Version: 1.0.0

Feature Use Case

My graphql schema is named schema.graphqls, which is the default from gqlgen (https://gqlgen.com/)

Feature Proposal

I think the plugin should include .graphqls alongside .gql and .graphql, or even make it configurable.

@shellscape
Copy link
Collaborator

Quick question: is there an RFC or ISO that covers graphql file naming?

@IanVS
Copy link
Contributor Author

IanVS commented Oct 27, 2021

Unfortunately not that I know of, graphql doesn't specify file names in the spec. There was an issue to propose a recommendation, but it was closed without an official decision I believe (graphql/graphql-spec#203).

Spring and gqlgen (and maybe others?) use .graphqls for schemas, and it's supported by most other tooling out there. Ref 99designs/gqlgen#1047 for example.

@IanVS IanVS changed the title [plugin-graphql] Allow other file extensions, like .graphqls [plugin-graphql] Allow .graphqls file extension Oct 27, 2021
@fmatosqg
Copy link

fmatosqg commented Dec 14, 2021

Adding my 2 cents, android apollo uses .sdl for schemas but also support .json. So far I'm not aware/able to have apollo handle schemas in .graphql file extension.

apollographql/apollo-tooling#1408

Edit: apollo also supports .graphqls extension: apollographql/apollo-kotlin#3083 (comment)

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 a pull request may close this issue.

3 participants