All Downloads are FREE. Search and download functionalities are using the official Maven repository.

node_modules.apollo-codegen-core.lib.compiler.legacyIR.d.ts Maven / Gradle / Ivy

There is a newer version: 3.3.1
Show newest version
import { GraphQLSchema, GraphQLType, GraphQLObjectType, GraphQLCompositeType, GraphQLInputType, DocumentNode } from 'graphql';
import '../utilities/array';
export interface CompilerOptions {
    addTypename?: boolean;
    mergeInFieldsFromFragmentSpreads?: boolean;
    passthroughCustomScalars?: boolean;
    customScalarsPrefix?: string;
    namespace?: string;
    generateOperationIds?: boolean;
}
export interface LegacyCompilerContext {
    schema: GraphQLSchema;
    operations: {
        [operationName: string]: LegacyOperation;
    };
    fragments: {
        [fragmentName: string]: LegacyFragment;
    };
    typesUsed: GraphQLType[];
    options: CompilerOptions;
}
export interface LegacyOperation {
    filePath?: string;
    operationName: string;
    operationId?: string;
    operationType: string;
    rootType: GraphQLObjectType;
    variables: {
        name: string;
        type: GraphQLType;
    }[];
    source: string;
    sourceWithFragments?: string;
    fields: LegacyField[];
    fragmentSpreads?: string[];
    inlineFragments?: LegacyInlineFragment[];
    fragmentsReferenced: string[];
}
export interface LegacyFragment {
    filePath?: string;
    fragmentName: string;
    source: string;
    typeCondition: GraphQLCompositeType;
    possibleTypes: GraphQLObjectType[];
    fields: LegacyField[];
    fragmentSpreads: string[];
    inlineFragments: LegacyInlineFragment[];
}
export interface LegacyInlineFragment {
    typeCondition: GraphQLObjectType;
    possibleTypes: GraphQLObjectType[];
    fields: LegacyField[];
    fragmentSpreads: string[];
}
export interface LegacyField {
    responseName: string;
    fieldName: string;
    args?: Argument[];
    type: GraphQLType;
    description?: string;
    isConditional?: boolean;
    conditions?: BooleanCondition[];
    isDeprecated?: boolean;
    deprecationReason?: string;
    fields?: LegacyField[];
    fragmentSpreads?: string[];
    inlineFragments?: LegacyInlineFragment[];
}
export interface BooleanCondition {
    variableName: string;
    inverted: boolean;
}
export interface Argument {
    name: string;
    value: any;
    type?: GraphQLInputType;
}
export declare function compileToLegacyIR(schema: GraphQLSchema, document: DocumentNode, options?: CompilerOptions): LegacyCompilerContext;




© 2015 - 2025 Weber Informatics LLC | Privacy Policy