-
Notifications
You must be signed in to change notification settings - Fork 2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
daf11ba
commit 2917840
Showing
123 changed files
with
1,936 additions
and
1,841 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -18,9 +18,9 @@ import { buildSchema } from '../../utilities/buildASTSchema'; | |
import { executeSync, execute } from '../execute'; | ||
|
||
async function executeQuery(args: { | ||
schema: GraphQLSchema, | ||
query: string, | ||
rootValue?: mixed, | ||
schema: GraphQLSchema; | ||
query: string; | ||
rootValue?: unknown; | ||
}) { | ||
const { schema, query, rootValue } = args; | ||
const document = parse(query); | ||
|
@@ -534,7 +534,7 @@ describe('Execute: Handles execution of abstract types', () => { | |
} | ||
`); | ||
|
||
function expectError({ forTypeName }: { forTypeName: mixed }) { | ||
function expectError({ forTypeName }: { forTypeName: unknown }) { | ||
const rootValue = { pet: { __typename: forTypeName } }; | ||
const result = executeSync({ schema, document, rootValue }); | ||
return { | ||
|
@@ -570,15 +570,15 @@ describe('Execute: Handles execution of abstract types', () => { | |
); | ||
|
||
// FIXME: workaround since we can't inject resolveType into SDL | ||
// $FlowExpectedError[incompatible-type] | ||
// @ts-expect-error | ||
assertInterfaceType(schema.getType('Pet')).resolveType = () => []; | ||
expectError({ forTypeName: undefined }).toEqual( | ||
'Abstract type "Pet" must resolve to an Object type at runtime for field "Query.pet" with value { __typename: undefined }, received "[]".', | ||
); | ||
|
||
// FIXME: workaround since we can't inject resolveType into SDL | ||
assertInterfaceType(schema.getType('Pet')).resolveType = | ||
// $FlowExpectedError[incompatible-type] | ||
// @ts-expect-error | ||
() => schema.getType('Cat'); | ||
expectError({ forTypeName: undefined }).toEqual( | ||
'Support for returning GraphQLObjectType from resolveType was removed in [email protected] please return type name instead.', | ||
|
Oops, something went wrong.