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

feat(graphql-language-service): Support for experimental fragment arguments #3761

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

JoviDeCroock
Copy link
Member

This is a work in progress branch for:

Being able to finish auto-complete and validation will depend on getting an alpha published as we need parse to behave well. The steps included in finishing this would be to add an auto-complete step for fragment arguments where we look up all fragments and check the available arguments so we can auto-complete.

Copy link

changeset-bot bot commented Sep 1, 2024

⚠️ No Changeset found

Latest commit: 975d101

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@@ -178,6 +178,9 @@ export function getTypeInfo(
argDefs =
directiveDef && (directiveDef.args as GraphQLArgument[]);
break;
case RuleKinds.FRAGMENT_SPREAD:
Copy link
Member Author

Choose a reason for hiding this comment

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

Not sure whether getting the type-info is actually needed here

Copy link
Member

Choose a reason for hiding this comment

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

so you are lexing properly with the changes in Rules, but you still need to track the arguments here

Copy link

codecov bot commented Sep 1, 2024

Codecov Report

Attention: Patch coverage is 33.33333% with 2 lines in your changes missing coverage. Please review.

Project coverage is 65.31%. Comparing base (ab48c83) to head (975d101).

Files with missing lines Patch % Lines
...graphql-language-service/src/parser/getTypeInfo.ts 0.00% 2 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #3761      +/-   ##
==========================================
- Coverage   65.32%   65.31%   -0.02%     
==========================================
  Files         122      122              
  Lines        7003     7006       +3     
  Branches     2260     2262       +2     
==========================================
+ Hits         4575     4576       +1     
- Misses       2411     2413       +2     
  Partials       17       17              
Files with missing lines Coverage Δ
...ervice/src/interface/getAutocompleteSuggestions.ts 85.86% <100.00%> (+0.03%) ⬆️
...kages/graphql-language-service/src/parser/Rules.ts 95.45% <ø> (ø)
...guage-service/src/utils/validateWithCustomRules.ts 95.23% <ø> (ø)
...graphql-language-service/src/parser/getTypeInfo.ts 82.31% <0.00%> (-1.14%) ⬇️

label: 'someVariable',
insertText: 'someVariable: ',
command: suggestionCommand,
insertTextFormat: 2,
Copy link
Member

Choose a reason for hiding this comment

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

if this test is not working yet, even with your graphql-js changes, it may be because we aren't outputting the arguments in getTypeInfo

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