@graphql-tools/graphql-tag-pluck

Interfaces

Functions

Functions

Const gqlPluckFromCodeString

gqlPluckFromCodeString(filePath: string, code: string, options: GraphQLTagPluckOptions): Promise‹string›

Defined in packages/graphql-tag-pluck/src/index.ts:121

Asynchronously plucks GraphQL template literals from a single file.

Supported file extensions include: .js, .jsx, .ts, .tsx, .flow, .flow.js, .flow.jsx, .vue

Parameters:

NameTypeDefaultDescription
filePathstring-Path to the file containing the code. Required to detect the file type
codestring-The contents of the file being parsed.
optionsGraphQLTagPluckOptions{}Additional options for determining how a file is parsed.

Returns: Promise‹string›


Const gqlPluckFromCodeStringSync

gqlPluckFromCodeStringSync(filePath: string, code: string, options: GraphQLTagPluckOptions): string

Defined in packages/graphql-tag-pluck/src/index.ts:146

Synchronously plucks GraphQL template literals from a single file

Supported file extensions include: .js, .jsx, .ts, .tsx, .flow, .flow.js, .flow.jsx, .vue

Parameters:

NameTypeDefaultDescription
filePathstring-Path to the file containing the code. Required to detect the file type
codestring-The contents of the file being parsed.
optionsGraphQLTagPluckOptions{}Additional options for determining how a file is parsed.

Returns: string