Skip to content

Nexus generated types issue #1175

@harsh7seasol

Description

@harsh7seasol

My nexus types are getting generated in typings.ts file
And my types is looks like this

Query: {
    UserSearch: NexusGenRootTypes['UserConnection'];
}
UserConnection: { // field return type
    edges: Array<NexusGenRootTypes['UserEdge'] | null> | null; // [UserEdge]
    pageInfo: NexusGenRootTypes['PageInfo']; // PageInfo!
 }
 UserEdge: { // field return type
    cursor: string; // String!
    node: NexusGenRootTypes['User'] | null; // User
 }

Where type of node in UserEdge suppose to be just NexusGenRootTypes['User']
But it generating as NexusGenRootTypes['User'] | null

In the older version of nexus it was working fine as it was generating type as NexusGenRootTypes['User'] only.
I was using nexus version - 0.12.0-rc.13
And when i have upgraded my code and nexus version to 1.3.0, it has raised this problem

I have also tried to give nulllable: false in my UserSearch queryField, but it didn't work.

Thanks in advance!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions