question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Cannot find name 'InputMaybe'.

See original GitHub issue

Issue workflow progress

Progress of the issue based on the Contributor Workflow

  • 1. The issue provides a reproduction available on Github, Stackblitz or CodeSandbox Make sure to fork this template and run yarn generate in the terminal. Please make sure the Codegen and plugins version under package.json matches yours.
  • 2. A failing test has been provided
  • 3. A local solution has been provided
  • 4. A pull request is pending review

my gql:

  getArticleHeads(
    page: Int = 0
  ): getArticleHeadsResponse

the generated typescript:

export type GetArticleHeadsQueryVariables = Exact<{
  page?: InputMaybe<Scalars['Int']>;
}>;

My tsc version is 4.6.3.

Issue Analytics

  • State:open
  • Created a year ago
  • Reactions:5
  • Comments:10

github_iconTop GitHub Comments

2reactions
bittttttencommented, Jul 4, 2022

@bitttttten the temporary fix isn’t working for me. Is there a way I can get it added into the type generation step? What is the difference between InputMaybe and Maybe?

I don’t know! There could be differences, as in perhaps InputMaybe returns a different falsey value than Maybe, but I could not say if that is true here or not. All I know is that for my use case, it worked to treat them as identical.

@bitttttten Will there be an official fix?

I am not so sure, I don’t maintain this library.

0reactions
Gonzagadavidcommented, Dec 1, 2022

Likewise, the inputMaybeValue config value does nothing for me. Did you manage to resolve it @PaulACoroneos ?

I had the same problem, as a temporary solution, I used add to insert the InputMaybe type in the type generation step

Read more comments on GitHub >

github_iconTop Results From Across the Web

Cannot find name 'Exact' · Issue #5273 · dotansimha/graphql ...
I'm running npm run gql to generate the code but I'm seeing this as an application error. Not really sure why it can't...
Read more >
Cannot find name 'Input'.ts(2304) [closed] - Stack Overflow
It's just missing or incorrect import. Add the import to import { Component, Input } from '@angular/core'.
Read more >
Angular - Cannot find name 'Input' - Solved - ItSolutionStuff.com
In this post, I will give you the solution of "Cannot find name 'Input'" in angular application. we need to import Input from...
Read more >
Installation - GraphQL Code Generator
If you are using Monorepo setup (Lerna/Yarn Workspaces/anything else), please note that GraphQL Codegen is using require to load plugins and ...
Read more >
Type 'string or undefined' is not assignable to type string
We used the ternary operator to check if the name property is not equal to ... have information about the type of a...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found