import * as graphqlUtils from '@graphql-tools/utils'; import * as graphql from 'graphql'; type GraphqlFiles = UnsafeGraphqlFiles | NormalizedGraphqlFiles; type UnsafeGraphqlFiles = { normalized?: false | null; files: Array; base?: string | null; pathAliases?: Map | null; }; type NormalizedGraphqlFiles = { normalized: true; files: Array; pathAliases: Map; }; declare const normalizeGraphqlFiles: (graphqlFiles: GraphqlFiles) => Promise; /** * Loads, validates, and parses graphql documents. * * @param graphqlFiles - Operation or fragment files to process. * * @returns The parsed GraphQL documents (or throws an error if parsing fails). */ declare const loadDocuments: (graphqlFiles: GraphqlFiles) => Promise>; /** * Loads, validates, and parses graphql schema. * * @param graphqlFiles - Schema files to process. * * @returns The parsed GraphQL schema (or throws an error if parsing fails). */ declare const loadSchema: (graphqlFiles: GraphqlFiles) => Promise; type ValidateDocumentsOptions = { schema: graphql.GraphQLSchema; documents: Array; }; /** * Validates GraphQL documents against their target schema. * * @param options - Validation options (schema and documents). * * @throws GraphQLError instances when validation fails. */ declare const validateDocuments: (options: ValidateDocumentsOptions) => void; type BundleOptions = { schema: GraphqlFiles; shake?: boolean | null; }; /** * Bundles multiple schema together into a single file. * * @param options - Bundle options. * * @returns The merged schema as text. */ declare const bundle: (options: BundleOptions) => Promise; type ValidateOptions = { schema: GraphqlFiles; operations?: GraphqlFiles | null; }; /** * Validates that the provided GraphQL schema contain valid syntax and have no * unknown symbols. When operations are provided, additionally validates that * every operation is valid against that schema. * * @param options - Validate options. * * @returns If validation is successful, returns a validation stamp: a text blob * describing the successful outcome and options used during validation. This * is often useful in build systems where a build step *must* emit a file. If * validation fails, a runtime error will be thrown. */ declare const validate: (options: ValidateOptions) => Promise; export { type BundleOptions, type GraphqlFiles, type NormalizedGraphqlFiles, type UnsafeGraphqlFiles, type ValidateDocumentsOptions, type ValidateOptions, bundle, loadDocuments, loadSchema, normalizeGraphqlFiles, validate, validateDocuments };