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

Schema editor marks all as invalid symbols #14

Closed
GrigoryPtashko opened this issue Jun 19, 2016 · 2 comments
Closed

Schema editor marks all as invalid symbols #14

GrigoryPtashko opened this issue Jun 19, 2016 · 2 comments
Assignees

Comments

@GrigoryPtashko
Copy link

Hello.

I wanted to create a graphql schema in a scratch file. So I'm opening a GraphQL Schema scratch and input a simple Node interface:

interface Node {
    id: ID!
}

But the editor marks all except id and ID as invalid.
Here's the screenshot:

screenshot 2016-06-19 11 13 51

Why is that?

Thank you.

@jimkyndemeyer
Copy link
Collaborator

Hi Grigory.

Thanks for using the plugin.

The schema language isn't supported yet for editing scenarios. The schema scratch file option appears to be an unintended side-effect of introducing support for traditional GraphQL scratch files.

Here more background regarding the schema language support from an earlier issue:

As it stands, the .graphqls support is considered read-only and requires that a valid parse tree can be created for syntax highlighting. It was added as a means of showing the currently loaded schema that the plugin uses for completion, error highlighting, and for providing find usages etc.

I logged graphql/codemirror-graphql#14 a short while ago since schema editing would be a useful addition. Until that issue is implemented, you should edit your schema file with another file extension to prevent the errors-as-you-type from popping up the console.

For now, I'll see if the schema scratch file option can be removed until it's fully supported. This should avoid confusing users.

Best regards,
Jim.

@jimkyndemeyer
Copy link
Collaborator

Released in v1.3.2.

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

No branches or pull requests

2 participants