Skip to content
This repository was archived by the owner on Dec 3, 2019. It is now read-only.

Commit 268a409

Browse files
author
Joel Griffith
committed
Fixing directive hint list when using aliases
1 parent bb82c0a commit 268a409

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

src/__tests__/hint-test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ describe('graphql-hint', () => {
8686
checkSuggestions(argumentNames, suggestions.list);
8787
});
8888

89-
it.only('provides correct argument suggestions when using aliases', async () => {
89+
it('provides correct argument suggestions when using aliases', async () => {
9090
var suggestions = await getHintSuggestions(
9191
'{ aliasTest: hasArgs ( ', { line: 0, ch: 23 });
9292
var argumentNames =

src/utils/getHintsAtPosition.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -235,6 +235,7 @@ function canUseDirective(kind, directive) {
235235
case 'Subscription':
236236
return locations.indexOf('SUBSCRIPTION') !== -1;
237237
case 'Field':
238+
case 'AliasedField':
238239
return locations.indexOf('FIELD') !== -1;
239240
case 'FragmentDefinition':
240241
return locations.indexOf('FRAGMENT_DEFINITION') !== -1;

0 commit comments

Comments
 (0)