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

Function: parseImportLine()

parseImportLine(importLine): object

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

Parses an import line, returning a list of entities imported and the file from which they are imported.

Throws if the import line does not have a correct format.

Parameters

importLine

string

Returns

object

from

from: string

imports

imports: string[]