Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix eslint
Browse files Browse the repository at this point in the history
acao committed Sep 9, 2024

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
1 parent d19672e commit 27d953e
Showing 2 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion packages/graphiql/cypress/e2e/docs.cy.ts
Original file line number Diff line number Diff line change
@@ -22,7 +22,7 @@ describe('GraphiQL DocExplorer - search', () => {
beforeEach(() => {
cy.get('.graphiql-sidebar button').eq(0).click();
cy.dataCy('doc-explorer-input').type('test');
cy.dataCy('doc-explorer-option').should('have.length', 7);
cy.dataCy('doc-explorer-option').should('have.length', 8);
});

it('Searches docs for values', () => {
Original file line number Diff line number Diff line change
@@ -312,18 +312,18 @@ export function getAutocompleteSuggestions(
(kind === RuleKinds.OBJECT_FIELD && step === 0)) &&
typeInfo.objectFieldDefs
) {
// @oneOf logic!
console.log(state.prevState?.prevState?.kind, !!typeInfo.inputType);
const { inputType, objectFieldDefs } = typeInfo;
const { string: tokenString } = token;
if (
typeInfo?.inputType &&
'isOneOf' in typeInfo.inputType &&
typeInfo?.inputType?.isOneOf === true &&
(state.prevState?.prevState?.kind !== 'Argument' || token.string !== '{')
inputType &&
'isOneOf' in inputType &&
inputType?.isOneOf === true &&
(prevState?.prevState?.kind !== 'Argument' || tokenString !== '{')
) {
// return empty array early if a oneOf field has already been provided
return [];
}
const objectFields = objectValues(typeInfo.objectFieldDefs);
const objectFields = objectValues(objectFieldDefs);
const completionKind =
kind === RuleKinds.OBJECT_VALUE
? CompletionItemKind.Value

0 comments on commit 27d953e

Please sign in to comment.