npx create-graphback graphql-testapollo-fullstack-react-mongo-tscd graphql-test && yarn && yarn generatecd client && yarn && yarn generateclient/src/generated-types.tsx
is generated with following types
export type FindCommentsQuery = (
{ __typename?: 'Query' }
& { findComments: (
{ __typename?: 'CommentResultList' }
& Pick<CommentResultList, '[object Object]' | '[object Object]' | '[object Object]'>
& { items: Array<Maybe<(
{ __typename?: 'Comment' }
& CommentExpandedFieldsFragment
)>> }
) }
);
Automatically generated comment to notify maintainers
/cc @craicoverflow, @machi1990, @wtrocki
Thanks for raising this issue @kresli! This looks to me like an issue with graphql-code-generator.
I tried this out and then updated these dependencies and now it works. If you do the same it should work:
"@graphql-cli/codegen": "1.17.14",
"@graphql-codegen/add": "2.0.1",
"@graphql-codegen/typescript": "1.17.11",
"@graphql-codegen/typescript-operations": "1.17.10",
"@graphql-codegen/typescript-react-apollo": "2.1.1",
shall I open a new issue there?
No need - they appear to have fixed this issue already, so if you try updating your dependencies it should work. Come back to me if it does not though :+1:
Most helpful comment
Thanks for raising this issue @kresli! This looks to me like an issue with graphql-code-generator.
I tried this out and then updated these dependencies and now it works. If you do the same it should work: