Skip to Content
GraphQL Tools
DocumentationAPI@graphql-tools/importsrcfunctionsprocessImport

Function: processImport()

processImport(filePath, cwd?, predefinedImports?, visitedFiles?, pathAliases?): DocumentNode

Defined in: packages/import/src/index.ts:136

Loads the GraphQL document and recursively resolves all the imports and copies them into the final document. processImport does not merge the typeDefs as designed ( https://github.com/ardatan/graphql-tools/issues/2980#issuecomment-1003692728 )

Parameters

filePath

string

cwd?

string = ...

predefinedImports?

Record<string, string> = {}

visitedFiles?

VisitedFilesMap = ...

pathAliases?

PathAliases

Returns

DocumentNode