-
-
Notifications
You must be signed in to change notification settings - Fork 71
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
Add new patches to graphql-language-service and remove monaco-editor patch #490
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Love the ideas for smarter autocomplete! Thanks for putting this together.
I think I might have found a few remaining edge cases before this is ready to merge and publish. Whenever you're able to take a look, I'll be happy to merge this.
experiments/browser_based_querying/patches/graphql-language-service@5.1.7.patch
Outdated
Show resolved
Hide resolved
+ // `state` is `null` when the user autocompletes after typing just '@' then opening autocomplete menu | ||
+ // further restrict the directives we suggest based on the type of the field we are on | ||
+ // x.label does not include the '@' | ||
+ if (primitives.has(typeInfo.fieldDef.type.name)) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What happens here if the field type is something like [String!]
or [[Int]]!
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Amazing point, thank you! Then it will be an object of
{
"ofType": { // <- the list
"name": "String" // <- the actual type
}
}
So the solution is just to iterate, done in 0f15fee
Don't check over each type's interface's interface's since the parent type must declare all interfaces implemented
15f64a4
to
64ebfd5
Compare
I remove the
monaco-editor
patch because it was the wrong fix, and we can just wait for the pr to land as it's just a console message.This pr adds:
... on X
fragmentsFuture possibilities:
op
type in@filter
?