UNPKG

gatsby-source-prismic

Version:

Gatsby source plugin for building websites using Prismic as a data source

15 lines (14 loc) 310 B
/** * Converts a given GraphQL type name to a list type. * * @example * * ```ts * listTypeName("MyType"); // => "[MyType]" * ``` * * @param typeName - Type name to convert. * * @returns Type name wrapped as a list type. */ export const listTypeName = (typeName: string): string => `[${typeName}]`;