Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Nexus generated types issue #1175

Open
harsh7seasol opened this issue Oct 15, 2024 · 0 comments
Open

Nexus generated types issue #1175

harsh7seasol opened this issue Oct 15, 2024 · 0 comments

Comments

@harsh7seasol
Copy link

harsh7seasol commented Oct 15, 2024

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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant