How to use the gqliteral/dist/core.WrappedType function in gqliteral

To help you get started, we’ve selected a few gqliteral examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github prisma-labs / nexus-prisma / plugin / prisma.ts View on Github external
},
  fn?: (t: PrismaObjectType) => void,
): WrappedType[] {
  // TODO refactor + make use of `objectTypeName`
  const realTypeName =
    typeof typeName === 'string' ? typeName : typeName.prismaTypeName
  const objectType = new PrismaObjectType(realTypeName)

  if (fn === undefined) {
    return [new WrappedType(objectType), ...objectType.prismaFields()]
  }

  // mutate objectType
  fn(objectType)

  return [new WrappedType(objectType), ...objectType.getTypesToExport()]
}

gqliteral

Scalable, strongly typed GraphQL schema development

MIT
Latest version published 5 years ago

Package Health Score

56 / 100
Full package analysis

Similar packages