graphql-binding
- Version 2.5.2
- Published
- 150 kB
- 8 dependencies
- MIT license
Install
npm i graphql-bindingyarn add graphql-bindingpnpm add graphql-bindingOverview
[](https://circleci.com/gh/graphql-binding/graphql-binding) [](https://badge.fury.io/js/graphql-binding)
Index
Functions
Classes
FlowGenerator
- getPayloadType()
- getTypeNames()
- graphqlRenderers
- render()
- renderDescription()
- renderExports()
- renderFieldName()
- renderFieldType()
- renderImports()
- renderInputFieldType()
- renderInterfaceOrObject()
- renderInterfaceWrapper()
- renderMainMethodFields()
- renderMutations()
- renderObjectWrapper()
- renderQueries()
- renderSubscriptions()
- renderTypes()
- renderTypeWrapper()
- scalarMapping
TypescriptGenerator
- getPayloadType()
- getTypeNames()
- graphqlRenderers
- render()
- renderDescription()
- renderExports()
- renderFieldName()
- renderFieldType()
- renderImports()
- renderInputFieldType()
- renderInterfaceOrObject()
- renderInterfaceWrapper()
- renderMainMethodFields()
- renderMutations()
- renderQueries()
- renderSubscriptions()
- renderTypes()
- renderTypeWrapper()
- scalarMapping
Interfaces
Functions
function addFragmentToInfo
addFragmentToInfo: ( info: GraphQLResolveInfo, fragment: string) => GraphQLResolveInfo;function buildInfo
buildInfo: ( rootFieldName: string, operation: Operation, schema: GraphQLSchema, info?: GraphQLResolveInfo | string | DocumentNode) => GraphQLResolveInfo;function extractFragmentReplacements
extractFragmentReplacements: (resolvers: IResolvers) => FragmentReplacement[];function forwardTo
forwardTo: ( bindingName: string) => <PARENT, ARGS, CONTEXT>( parent: PARENT, args: ARGS, context: CONTEXT, info: GraphQLResolveInfo) => any;function makeBindingClass
makeBindingClass: <T>({ schema }: { schema: GraphQLSchema }) => T;Classes
class Binding
class Binding extends Delegate {}constructor
constructor({ schema, fragmentReplacements, before, disableCache,}: BindingOptions);property mutation
mutation: QueryMap;property query
query: QueryMap;property subscription
subscription: SubscriptionMap;method buildMethods
buildMethods: () => any;method buildQueryMethods
buildQueryMethods: (operation: QueryOrMutation) => QueryMap;method buildSubscriptionMethods
buildSubscriptionMethods: () => SubscriptionMap;class Delegate
class Delegate {}constructor
constructor({ schema, fragmentReplacements, before, disableCache,}: BindingOptions);property before
before: () => void;property disableCache
disableCache: boolean;property schema
schema: GraphQLSchema;method delegate
delegate: ( operation: QueryOrMutation, fieldName: string, args: { [key: string]: any }, infoOrQuery?: GraphQLResolveInfo | string, options?: Options) => Promise<any>;method delegateSubscription
delegateSubscription: ( fieldName: string, args?: { [key: string]: any }, infoOrQuery?: GraphQLResolveInfo | string, options?: Options) => Promise<AsyncIterator<any>>;method getAbstractResolvers
getAbstractResolvers: (filterSchema?: GraphQLSchema | string) => IResolvers;method request
request: <T = any>( query: string, variables?: { [key: string]: any }) => Promise<T>;class FlowGenerator
class FlowGenerator extends Generator {}constructor
constructor({ schema, inputSchemaPath, outputBindingPath, isDefaultExport,}: { schema: GraphQLSchema; inputSchemaPath: string; outputBindingPath: string; isDefaultExport: boolean;});property graphqlRenderers
graphqlRenderers: { GraphQLUnionType: (type: GraphQLUnionType) => string; GraphQLObjectType: (type: any) => string; GraphQLInterfaceType: (type: any) => string; GraphQLInputObjectType: (type: any) => string; GraphQLScalarType: (type: GraphQLScalarType) => string; GraphQLIDType: (type: GraphQLScalarType) => string; GraphQLEnumType: (type: GraphQLEnumType) => string;};property scalarMapping
scalarMapping: { Int: string; String: string; ID: string; Float: string; Boolean: string; DateTime: string;};method getPayloadType
getPayloadType: (operation: string, type: string) => string;method getTypeNames
getTypeNames: () => string[];method render
render: () => string;method renderDescription
renderDescription: (description: Maybe<string>) => string;method renderExports
renderExports: () => string;method renderFieldName
renderFieldName: (field: GraphQLInputField | GraphQLField<any, any>) => string;method renderFieldType
renderFieldType: (type: GraphQLInputType | GraphQLOutputType) => string;method renderImports
renderImports: () => string;method renderInputFieldType
renderInputFieldType: (type: GraphQLInputType | GraphQLOutputType) => any;method renderInterfaceOrObject
renderInterfaceOrObject: ( type: GraphQLObjectType | GraphQLInputObjectType | GraphQLInterfaceType) => string;method renderInterfaceWrapper
renderInterfaceWrapper: ( typeName: string, typeDescription: Maybe<string>, interfaces: GraphQLInterfaceType[], fieldDefinition: string) => string;method renderMainMethodFields
renderMainMethodFields: ( operation: string, fields: GraphQLFieldMap<any, any>) => string;method renderMutations
renderMutations: () => string;method renderObjectWrapper
renderObjectWrapper: ( typeName: string, typeDescription: Maybe<string>, objects: GraphQLObjectType[], fieldDefinition: string) => string;method renderQueries
renderQueries: () => string;method renderSubscriptions
renderSubscriptions: () => string;method renderTypes
renderTypes: () => string;method renderTypeWrapper
renderTypeWrapper: ( typeName: string, typeDescription: Maybe<string>, fieldDefinition: string) => string;class Generator
class Generator {}constructor
constructor({ schema, inputSchemaPath, outputBindingPath, isDefaultExport,}: { schema: GraphQLSchema; inputSchemaPath: string; outputBindingPath: string; isDefaultExport: boolean;});property inputSchemaPath
inputSchemaPath: string;property isDefaultExport
isDefaultExport: boolean;property outputBindingPath
outputBindingPath: string;property schema
schema: GraphQLSchema;method compile
compile: ( strings: TemplateStringsArray, ...interpolations: Interpolation<Generator>[]) => string;method getRelativeSchemaPath
getRelativeSchemaPath: () => string;method render
render: () => string;method renderExports
renderExports: () => string;method renderImports
renderImports: () => string;class TypescriptGenerator
class TypescriptGenerator extends Generator {}constructor
constructor({ schema, inputSchemaPath, outputBindingPath, isDefaultExport,}: { schema: GraphQLSchema; inputSchemaPath: string; outputBindingPath: string; isDefaultExport: boolean;});property graphqlRenderers
graphqlRenderers: { GraphQLUnionType: (type: GraphQLUnionType) => string; GraphQLObjectType: (type: any) => string; GraphQLInterfaceType: (type: any) => string; GraphQLInputObjectType: (type: any) => string; GraphQLScalarType: (type: GraphQLScalarType) => string; GraphQLIDType: (type: GraphQLScalarType) => string; GraphQLEnumType: (type: GraphQLEnumType) => string;};property scalarMapping
scalarMapping: { Int: string; String: string; ID: string; Float: string; Boolean: string; DateTime: string; Json: string;};method getPayloadType
getPayloadType: (operation: string, nonNullType: boolean) => string;method getTypeNames
getTypeNames: () => string[];method render
render: () => string;method renderDescription
renderDescription: (description: Maybe<string>) => string;method renderExports
renderExports: () => string;method renderFieldName
renderFieldName: (field: GraphQLInputField | GraphQLField<any, any>) => string;method renderFieldType
renderFieldType: (type: GraphQLInputType | GraphQLOutputType) => string;method renderImports
renderImports: () => string;method renderInputFieldType
renderInputFieldType: (type: GraphQLInputType | GraphQLOutputType) => string;method renderInterfaceOrObject
renderInterfaceOrObject: ( type: GraphQLObjectType | GraphQLInputObjectType | GraphQLInterfaceType) => string;method renderInterfaceWrapper
renderInterfaceWrapper: ( typeName: string, typeDescription: Maybe<string>, interfaces: GraphQLInterfaceType[], fieldDefinition: string) => string;method renderMainMethodFields
renderMainMethodFields: ( operation: string, fields: GraphQLFieldMap<any, any>) => string;method renderMutations
renderMutations: () => string;method renderQueries
renderQueries: () => string;method renderSubscriptions
renderSubscriptions: () => string;method renderTypes
renderTypes: () => string;method renderTypeWrapper
renderTypeWrapper: ( typeName: string, typeDescription: Maybe<string>, fieldDefinition: string) => string;Interfaces
interface BindingOptions
interface BindingOptions {}property before
before?: () => void;property disableCache
disableCache?: boolean;property fragmentReplacements
fragmentReplacements?: FragmentReplacement[];property schema
schema: GraphQLSchema;interface FragmentReplacement
interface FragmentReplacement {}interface Options
interface Options {}property context
context?: Context;property transforms
transforms?: Transform[];Package Files (12)
Dependencies (8)
Dev Dependencies (18)
Peer Dependencies (0)
No peer dependencies.
Badge
To add a badge like this oneto your package's README, use the codes available below.
You may also use Shields.io to create a custom badge linking to https://www.jsdocs.io/package/graphql-binding.
- Markdown[](https://www.jsdocs.io/package/graphql-binding)
- HTML<a href="https://www.jsdocs.io/package/graphql-binding"><img src="https://img.shields.io/badge/jsDocs.io-reference-blue" alt="jsDocs.io"></a>
- Updated .
Package analyzed in 5267 ms. - Missing or incorrect documentation? Open an issue for this package.
