nexus
nexus copied to clipboard
Code-First, Type-Safe, GraphQL Schema Construction
As per title update 06-chapter-5-persisting-data-via-prisma.mdx to include changes to api/server.ts
running nexus v1.3.0, prisma v4.0.0 Error: Error: NEXUS__UNKNOWN__TYPE was already defined and imported as a type, check the docs for extending types
I have a nexus schema that looks like this: ```ts const schema = makeSchema({ shouldGenerateArtifacts: path.basename(__dirname) !== 'dist', types, typegenAutoConfig: { contextType: 'ctx.Context', sources: [ { alias: 'ctx', source: path.join(__dirname,...
I have the following code: ```javascript export const postQueries = queryField(t => { t.connectionField("getAllPublishedPosts", { type: PostType, cursorFromNode: ({ id }) => id, additionalArgs: { filter: nullable(stringArg()), }, nodes: async...
``` mockObj = { name: "John", cars: { van: "", truck: "" } } const InitialQuestions = inputObjectType({ name: 'InitialQuestions', definition: (t) => { t.string('name') ** DEFINE CARS PROPERTY HERE...
In `1.0.0` version, I was able to reuse definitions for both `objectType` and `inputObjectType` like so: ``` const experienceFieldsDefinition = (t: ObjectDefinitionBlock | InputDefinitionBlock) => { t.nonNull.string("position"); // Next line...
Right now, when working with Prisma Client, it's really cumbersome to pass optional GraphQL input arguments to a Prisma Client query because of the different ways how GraphQL and Prisma...
`ts-node` does not auto-import types from `include` because there's a notable performance penalty to doing so. As a result when running with `ts-node` the types file generated by Nexus' `typegen`...
I am trying to add `args` to a mutation, and while trying to access the args in resolver, the TS type is showing `any`. I've also tried restarted the editor...