Catch the highlights of GraphQLConf 2023! Click for recordings. Or check out our recap blog post.
Docs
API Reference
Packages
webpack-loader-runtime

@graphql-tools/webpack-loader-runtime

Variables

Functions

Variables

uniqueCode

Const uniqueCode: "\n var names = {};\n function unique(defs) {\n return defs.filter(function (def) {\n if (def.kind !== 'FragmentDefinition') return true;\n var name = def.name.value;\n if (names[name]) {\n return false;\n } else {\n names[name] = true;\n return true;\n }\n });\n };\n"

Defined in

packages/webpack-loader-runtime/src/index.ts:3

Functions

useUnique

useUnique(): (defs: DefinitionNode[]) => DefinitionNode[]

Returns

fn

▸ (defs): DefinitionNode[]

Parameters
NameType
defsDefinitionNode[]
Returns

DefinitionNode[]

Defined in

packages/webpack-loader-runtime/src/index.ts:19