-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
feat: export more functions #1264
Conversation
Codecov Report
@@ Coverage Diff @@
## master #1264 +/- ##
=======================================
Coverage 58.98% 58.98%
=======================================
Files 60 60
Lines 3023 3023
Branches 806 806
=======================================
Hits 1783 1783
Misses 1194 1194
Partials 46 46
Continue to review full report at Codecov.
|
hey thanks! sure this works, though ideally soon we should be instantiating the GraphQLLanguageService in codemirror instead as we will be doing with monaco, so we can leverage the class instance for a bunch of useful things |
also, with lerna's conventional commits implementation, you don't need to indicate the package for scope, as this will automatically generate a change to only the interface changelog anyways. so just |
I take that back, I see now that codemirror uses the this should be fine then! again though, we should combine all of the types, no need for codemirror specific types except for |
@@ -247,6 +247,16 @@ export type ContextToken = { | |||
style: string; | |||
}; | |||
|
|||
export type ContextTokenForCodeMirror = { |
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.
ContextToken
is only used by Codemirror, so lets combine this into one type
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.
Isn't ContextToken
used inside graphql-language-service-interface
even if you do with vscode?
graphiql/packages/graphql-language-service-interface/src/getAutocompleteSuggestions.ts
Line 394 in 917c393
): ContextToken { |
export type CompletionItem = CompletionItemType & { | ||
isDeprecated?: boolean; | ||
deprecationReason?: string; | ||
}; | ||
|
||
export type CompletionItemForCodeMirror = { |
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 is diffferent about this type? do you just need to make it deprecationReason?: string | null
?
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.
In a successive PR, getAutocompleteSuggestions
for CodeMirror returns an object that only contains properties label
, type
, documentation
, isDeprecated
, deprecationReason
. It doesn't contain many of properties of CompletionItemType
and I don't have a plan to add those properties, so I thought using a type designated for it, which is CompletionItemForCodeMirror
, it is easier to understand what getAutocompleteSuggestions
for CodeMirror actually returns.
@yoshiakis coming back to this and realizing that a) our flow types are again woefully out of date and b) the monaco PR is about to lead to some LSP interface changes. |
@yoshiakis oh my bad, i think i was mistaken. let me double check this PR |
looks good to me! |
Notice: I'll PR this change once #1265 has completed since I want to rebase the branch at this PR on master branch after #1265 has finished.
This change exports more functions from
graphql-language-service-interface
socodemirror-graphql
can use them, too (#902 ).