@types/graphql
Advanced tools
Comparing version 14.0.7 to 14.2.0
@@ -20,3 +20,3 @@ import Maybe from "../tsutils/Maybe"; | ||
} from "../language/ast"; | ||
import { MaybePromise } from "../jsutils/MaybePromise"; | ||
import { PromiseOrValue } from "../jsutils/PromiseOrValue"; | ||
@@ -41,3 +41,3 @@ /** | ||
export interface ExecutionResultDataDefault { | ||
[key: string]: any | ||
[key: string]: any; | ||
} | ||
@@ -78,4 +78,6 @@ | ||
*/ | ||
export function execute<TData = ExecutionResultDataDefault>(args: ExecutionArgs): MaybePromise<ExecutionResult<TData>>; | ||
export function execute<TData = ExecutionResultDataDefault>( | ||
args: ExecutionArgs | ||
): PromiseOrValue<ExecutionResult<TData>>; | ||
export function execute<TData = ExecutionResultDataDefault>( | ||
schema: GraphQLSchema, | ||
@@ -88,3 +90,3 @@ document: DocumentNode, | ||
fieldResolver?: Maybe<GraphQLFieldResolver<any, any>> | ||
): MaybePromise<ExecutionResult<TData>>; | ||
): PromiseOrValue<ExecutionResult<TData>>; | ||
@@ -91,0 +93,0 @@ /** |
@@ -1,2 +0,2 @@ | ||
// Type definitions for graphql 14.0 | ||
// Type definitions for graphql 14.2 | ||
// Project: https://github.com/graphql/graphql-js | ||
@@ -21,2 +21,3 @@ // Definitions by: TonyYang <https://github.com/TonyPythoneer> | ||
// Mark Caudill <https://github.com/mc0> | ||
// Martijn Walraven <https://github.com/martijnwalraven> | ||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped | ||
@@ -23,0 +24,0 @@ // TypeScript Version: 2.6 |
@@ -0,1 +1,3 @@ | ||
import { ASTNode } from "./ast"; | ||
/** | ||
@@ -5,2 +7,2 @@ * Converts an AST into a string, using one set of reasonable | ||
*/ | ||
export function print(ast: any): string; | ||
export function print(ast: ASTNode): string; |
{ | ||
"name": "@types/graphql", | ||
"version": "14.0.7", | ||
"version": "14.2.0", | ||
"description": "TypeScript definitions for graphql", | ||
@@ -96,2 +96,7 @@ "license": "MIT", | ||
"githubUsername": "mc0" | ||
}, | ||
{ | ||
"name": "Martijn Walraven", | ||
"url": "https://github.com/martijnwalraven", | ||
"githubUsername": "martijnwalraven" | ||
} | ||
@@ -103,8 +108,9 @@ ], | ||
"type": "git", | ||
"url": "https://github.com/DefinitelyTyped/DefinitelyTyped.git" | ||
"url": "https://github.com/DefinitelyTyped/DefinitelyTyped.git", | ||
"directory": "types/graphql" | ||
}, | ||
"scripts": {}, | ||
"dependencies": {}, | ||
"typesPublisherContentHash": "95c0175f44ce3566e85ae9fefbbcad841e10e81d7bebb21403ff30c137c64900", | ||
"typesPublisherContentHash": "e9abe97d519968490452ab5a5e6b0538eed08d48f33522e4bad3eefb6eaa6adc", | ||
"typeScriptVersion": "2.6" | ||
} |
@@ -11,3 +11,3 @@ # Installation | ||
Additional Details | ||
* Last updated: Wed, 13 Feb 2019 18:42:10 GMT | ||
* Last updated: Fri, 29 Mar 2019 18:26:15 GMT | ||
* Dependencies: none | ||
@@ -17,2 +17,2 @@ * Global values: none | ||
# Credits | ||
These definitions were written by TonyYang <https://github.com/TonyPythoneer>, Caleb Meredith <https://github.com/calebmer>, Dominic Watson <https://github.com/intellix>, Firede <https://github.com/firede>, Kepennar <https://github.com/kepennar>, Mikhail Novikov <https://github.com/freiksenet>, Ivan Goncharov <https://github.com/IvanGoncharov>, Hagai Cohen <https://github.com/DxCx>, Ricardo Portugal <https://github.com/rportugal>, Tim Griesser <https://github.com/tgriesser>, Dylan Stewart <https://github.com/dyst5422>, Alessio Dionisi <https://github.com/adnsio>, Divyendu Singh <https://github.com/divyenduz>, Brad Zacher <https://github.com/bradzacher>, Curtis Layne <https://github.com/clayne11>, Jonathan Cardoso <https://github.com/JCMais>, Pavel Lang <https://github.com/langpavel>, Mark Caudill <https://github.com/mc0>. | ||
These definitions were written by TonyYang <https://github.com/TonyPythoneer>, Caleb Meredith <https://github.com/calebmer>, Dominic Watson <https://github.com/intellix>, Firede <https://github.com/firede>, Kepennar <https://github.com/kepennar>, Mikhail Novikov <https://github.com/freiksenet>, Ivan Goncharov <https://github.com/IvanGoncharov>, Hagai Cohen <https://github.com/DxCx>, Ricardo Portugal <https://github.com/rportugal>, Tim Griesser <https://github.com/tgriesser>, Dylan Stewart <https://github.com/dyst5422>, Alessio Dionisi <https://github.com/adnsio>, Divyendu Singh <https://github.com/divyenduz>, Brad Zacher <https://github.com/bradzacher>, Curtis Layne <https://github.com/clayne11>, Jonathan Cardoso <https://github.com/JCMais>, Pavel Lang <https://github.com/langpavel>, Mark Caudill <https://github.com/mc0>, Martijn Walraven <https://github.com/martijnwalraven>. |
// Conveniently represents flow's "Maybe" type https://flow.org/en/docs/types/maybe/ | ||
type Maybe<T> = null | undefined | T | ||
type Maybe<T> = null | undefined | T; | ||
export default Maybe | ||
export default Maybe; |
import Maybe from "../tsutils/Maybe"; | ||
import { MaybePromise } from "../jsutils/MaybePromise"; | ||
import { PromiseOrValue } from "../jsutils/PromiseOrValue"; | ||
import { | ||
@@ -164,3 +164,2 @@ ScalarTypeDefinitionNode, | ||
interface _GraphQLList<T extends GraphQLType> { | ||
@@ -284,2 +283,8 @@ (type: T): GraphQLList<T>; | ||
toConfig(): GraphQLScalarTypeConfig<any, any> & { | ||
parseValue: GraphQLScalarValueParser<any>; | ||
parseLiteral: GraphQLScalarLiteralParser<any>; | ||
extensionASTNodes: ReadonlyArray<ScalarTypeExtensionNode>; | ||
}; | ||
toString(): string; | ||
@@ -347,7 +352,3 @@ toJSON(): string; | ||
*/ | ||
export class GraphQLObjectType< | ||
TSource = any, | ||
TContext = any, | ||
TArgs = { [key: string]: any } | ||
> { | ||
export class GraphQLObjectType<TSource = any, TContext = any, TArgs = { [key: string]: any }> { | ||
name: string; | ||
@@ -362,2 +363,9 @@ description: Maybe<string>; | ||
getInterfaces(): GraphQLInterfaceType[]; | ||
toConfig(): GraphQLObjectTypeConfig<any, any> & { | ||
interfaces: GraphQLInterfaceType[]; | ||
fields: GraphQLFieldConfigMap<any, any>; | ||
extensionASTNodes: ReadonlyArray<ObjectTypeExtensionNode>; | ||
}; | ||
toString(): string; | ||
@@ -368,7 +376,3 @@ toJSON(): string; | ||
export interface GraphQLObjectTypeConfig< | ||
TSource, | ||
TContext, | ||
TArgs = { [key: string]: any } | ||
> { | ||
export interface GraphQLObjectTypeConfig<TSource, TContext, TArgs = { [key: string]: any }> { | ||
name: string; | ||
@@ -383,11 +387,7 @@ interfaces?: Thunk<Maybe<GraphQLInterfaceType[]>>; | ||
export type GraphQLTypeResolver< | ||
TSource, | ||
TContext, | ||
TArgs = { [key: string]: any } | ||
> = ( | ||
export type GraphQLTypeResolver<TSource, TContext, TArgs = { [key: string]: any }> = ( | ||
value: TSource, | ||
context: TContext, | ||
info: GraphQLResolveInfo | ||
) => MaybePromise<Maybe<GraphQLObjectType<TSource, TContext, TArgs> | string>>; | ||
) => PromiseOrValue<Maybe<GraphQLObjectType<TSource, TContext, TArgs> | string>>; | ||
@@ -398,3 +398,3 @@ export type GraphQLIsTypeOfFn<TSource, TContext> = ( | ||
info: GraphQLResolveInfo | ||
) => MaybePromise<boolean>; | ||
) => PromiseOrValue<boolean>; | ||
@@ -471,7 +471,3 @@ export type GraphQLFieldResolver<TSource, TContext, TArgs = { [argName: string]: any }> = ( | ||
export type GraphQLFieldMap< | ||
TSource, | ||
TContext, | ||
TArgs = { [key: string]: any } | ||
> = { | ||
export type GraphQLFieldMap<TSource, TContext, TArgs = { [key: string]: any }> = { | ||
[key: string]: GraphQLField<TSource, TContext, TArgs>; | ||
@@ -509,2 +505,7 @@ }; | ||
toConfig(): GraphQLInterfaceTypeConfig<any, any> & { | ||
fields: GraphQLFieldConfigMap<any, any>; | ||
extensionASTNodes: ReadonlyArray<InterfaceTypeExtensionNode>; | ||
}; | ||
toString(): string; | ||
@@ -515,7 +516,3 @@ toJSON(): string; | ||
export interface GraphQLInterfaceTypeConfig< | ||
TSource, | ||
TContext, | ||
TArgs = { [key: string]: any } | ||
> { | ||
export interface GraphQLInterfaceTypeConfig<TSource, TContext, TArgs = { [key: string]: any }> { | ||
name: string; | ||
@@ -568,2 +565,7 @@ fields: Thunk<GraphQLFieldConfigMap<TSource, TContext, TArgs>>; | ||
toConfig(): GraphQLUnionTypeConfig<any, any> & { | ||
types: GraphQLObjectType[]; | ||
extensionASTNodes: ReadonlyArray<UnionTypeExtensionNode>; | ||
}; | ||
toString(): string; | ||
@@ -621,2 +623,7 @@ toJSON(): string; | ||
parseLiteral(valueNode: ValueNode, _variables: Maybe<{ [key: string]: any }>): Maybe<any>; | ||
toConfig(): GraphQLEnumTypeConfig & { | ||
extensionASTNodes: ReadonlyArray<EnumTypeExtensionNode>; | ||
}; | ||
toString(): string; | ||
@@ -680,2 +687,8 @@ toJSON(): string; | ||
getFields(): GraphQLInputFieldMap; | ||
toConfig(): GraphQLInputObjectTypeConfig & { | ||
fields: GraphQLInputFieldConfigMap; | ||
extensionASTNodes: ReadonlyArray<InputObjectTypeExtensionNode>; | ||
}; | ||
toString(): string; | ||
@@ -682,0 +695,0 @@ toJSON(): string; |
@@ -23,2 +23,6 @@ import Maybe from "../tsutils/Maybe"; | ||
constructor(config: GraphQLDirectiveConfig); | ||
toConfig(): GraphQLDirectiveConfig & { | ||
args: GraphQLFieldConfigArgumentMap; | ||
}; | ||
} | ||
@@ -25,0 +29,0 @@ |
@@ -55,2 +55,8 @@ import Maybe from "../tsutils/Maybe"; | ||
getDirective(name: string): Maybe<GraphQLDirective>; | ||
toConfig(): GraphQLSchemaConfig & { | ||
types: GraphQLNamedType[]; | ||
directives: GraphQLDirective[]; | ||
extensionASTNodes: ReadonlyArray<SchemaExtensionNode>; | ||
}; | ||
} | ||
@@ -57,0 +63,0 @@ |
@@ -18,3 +18,3 @@ import Maybe from "../tsutils/Maybe"; | ||
import { ParseOptions } from "../language/parser"; | ||
import blockStringValue from "../language/blockStringValue"; | ||
import { dedentBlockStringValue } from "../language/blockString"; | ||
@@ -21,0 +21,0 @@ interface BuildSchemaOptions extends GraphQLSchemaValidationOptions { |
@@ -5,3 +5,3 @@ import { GraphQLError } from "../error"; | ||
import { TypeInfo } from "../utilities/TypeInfo"; | ||
import { ValidationRule } from "./ValidationContext"; | ||
import { ValidationRule, SDLValidationRule } from "./ValidationContext"; | ||
@@ -31,2 +31,9 @@ /** | ||
// @internal | ||
export function validateSDL( | ||
documentAST: DocumentNode, | ||
schemaToExtend?: GraphQLSchema | null, | ||
rules?: ReadonlyArray<SDLValidationRule> | ||
): GraphQLError[]; | ||
/** | ||
@@ -33,0 +40,0 @@ * Utility function which asserts a SDL document is valid by throwing an error |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
161714
4190