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

fix: headers tab - highlighting and schema fetch #1593

Merged
merged 1 commit into from
Jun 23, 2020
Merged

Conversation

acao
Copy link
Member

@acao acao commented Jun 23, 2020

- headers tab does not re-fetch schema with same headers when fetcher prop changes
- codemirror mode for json, `graphql-headers` is a non-existant mode
require('codemirror/keymap/sublime');

const editor = (this.editor = this.CodeMirror(this._node, {
value: this.props.value || '',
lineNumbers: true,
tabSize: 2,
mode: 'graphql-headers',
mode: { name: 'javascript', json: true },
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@acao This was done because the variable editor was set to graphql-variables, is that an actual mode or should we change that as well?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

graphql-variables is an actual mode in the codemirror-graphql package in this repo, as you can see in the require() statements

require('codemirror-graphql/variables/mode');

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

codemirror is not the simplest to wrap your head around, so I can totally relate with this choice! haha

@acao acao merged commit 0d050ca into 1.0.0 Jun 23, 2020
@acao acao deleted the fix/headers-tab branch June 23, 2020 21:46
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 this pull request may close these issues.

2 participants