Closed cailloumajor closed 4 years ago
this extension loads .graphql
files. i have never seen the .graphqls
extension before, sorry!
@acao:
this extension loads .graphql files
Not only, as I already said, this extension supports, among others, .graphqls
file type. Taking a look at grammars/graphql.json
, you can find:
i have never seen the .graphqls extension before
This doesn't mean there is no need for it:
grammars/graphql.json
in the commit 1d2707fc2ce557cf48fa2babf900a95cc2e58993, for a good reason I thinki’m not in disagrement at all! just haven’t noticed it before. i will be sure to add it to the underlying LSP server repo, which is in graphql/graphiql. most of the business logic for this extension lives there
i’m not in disagrement at all!
Sorry, I felt you were by closing the issue...
ope i guess i did. will get to all this soon!
if you can, re-create this ticket for the language server? and you can add this extension to the list in a PR. they are all defined in one place
@acao thank you for re-opening.
I think the problem is simpler than you think: the contents of .graphqls
files is standard GraphQL language, the extension is just different to denote the purpose of the file, i.e. schema definition. My request here is just that VSCode handles .graphqls
files exactly the same manner as .graphql
files. There is no need to add a new language.
My apologies if my request was not clear enough.
I achieved to obtain the needed behavior by adding ".graphqls"
to the array below in package.json
.
https://github.com/prisma-labs/vscode-graphql/blob/6bdfa89e63f737134b2d9a6a4e8959092b0e2fbf/package.json#L48-L51
If you agree with this change, I would be glad to open a pull request.
please open the PR, you don’t need my permission!
you will also need a PR to graphql/graphiql
repo, otherwise you’ll only have highlighting support for .graphqls
files
for reference, this line would be the only other thing you need to change for this to work end to end!
changing the configuration you are pointing to will only add highlighting support. the graphql/graphiql
repo is where all the logic for validation, code completion (aka intellisense), and everything else live.
Actual Behavior
While this extension supports
.graphqls
files, Visual Studio Code is not aware of it.Expected Behavior
Associate this extension with
.graphqls
files.Steps to Reproduce the Problem Or Description
Open a
.grapphqls
file:Specifications
Logs Of TS Server || GraphQL Language Service
Not relevant