Skip to content

addTypename flag should be false by default (#680)#713

Closed
milosdanilov wants to merge 0 commit intoapollographql:masterfrom
milosdanilov:master
Closed

addTypename flag should be false by default (#680)#713
milosdanilov wants to merge 0 commit intoapollographql:masterfrom
milosdanilov:master

Conversation

@milosdanilov
Copy link
Copy Markdown
Contributor

By following documentation --addTypename argument should be set to false by default

@zamiang
Copy link
Copy Markdown

zamiang commented Nov 19, 2018

Curious, any possible way to set addTypename to false given the existing command line argument options?

@milosdanilov
Copy link
Copy Markdown
Contributor Author

milosdanilov commented Nov 19, 2018

@zamiang Nope. You can not pass a value to addTypename flag. It is just checked for presence of that particular flag.

@milosdanilov
Copy link
Copy Markdown
Contributor Author

@martijnwalraven or @jbaxleyii please review this.

@jbaxleyiii
Copy link
Copy Markdown
Contributor

@milosdanilov I think that addTypename should be true since its the default for Apollo Client. With Oclif, we should be able to add a negation ability to this flag via the flag config which we can document in the flag description.

From the oclif docs:

// flag with no value (-f, --force)
  force: flags.boolean({
    char: 'f',
    default: true,                // default value if flag not passed (can be a function that returns a boolean)
    // boolean flags may be reversed with `--no-` (in this case: `--no-force`).
    // The flag will be set to false if reversed. This functionality
    // is disabled by default, to enable it:
    // allowNo: true
  }),

Comment thread packages/apollo/src/commands/client/codegen.ts Outdated
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

Successfully merging this pull request may close these issues.

3 participants