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

fieldnames can give incorrect generated types #1365

Closed
maapteh opened this issue Feb 27, 2019 · 3 comments
Closed

fieldnames can give incorrect generated types #1365

maapteh opened this issue Feb 27, 2019 · 3 comments
Assignees
Labels
waiting-for-release Fixed/resolved, and waiting for the next stable release

Comments

@maapteh
Copy link
Contributor

maapteh commented Feb 27, 2019

Describe the bug
fieldnames can give incorrect generated types.

To Reproduce
When i have a 'mutation' field in the type 'BasketMutationResult' i get the following result:

export namespace AddBasketItem {
    export type Variables = {
        item: BasketMutation;
    };

    export type Mutation = {
        __typename?: 'Mutation';

        addBasketItem: Maybe<AddBasketItem>;
    };

    export type AddBasketItem = {
        __typename?: 'BasketMutationResult';

        mutation: Maybe<Mutation>;
    };

    export type Mutation =
        | BasketMutationType.Fragment
        | BasketDeleteType.Fragment;
}

It adds type Mutation twice while the last is not correct.

Expected behavior
Not do this :)

Environment:

  • OS: OSX
  • Codegen: 0.17.0
  • Node: 10
@kamilkisiela
Copy link
Collaborator

#1369 should fix it

@kamilkisiela kamilkisiela added the waiting-for-release Fixed/resolved, and waiting for the next stable release label Feb 27, 2019
@maapteh
Copy link
Contributor Author

maapteh commented Feb 27, 2019

super!

@dotansimha
Copy link
Owner

Fixed in 0.18.0 🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
waiting-for-release Fixed/resolved, and waiting for the next stable release
Projects
None yet
Development

No branches or pull requests

3 participants