graphcommerce icon indicating copy to clipboard operation
graphcommerce copied to clipboard

Automatically insert the typePolicies keyfields into query

Open paales opened this issue 2 years ago • 0 comments

Describe the feature you'd like to request

I'd like for this issue to be automatically resolved as it seems redundant

Invariant Violation: Missing field 'uid' while extracting keyFields from {"__typename":"CustomizablePackagingOption"}

Describe the solution you'd like

I'd like GraphQL Codegen to automatically insert the uid /etc. in any generated query: https://github.com/graphcommerce-org/graphcommerce/blob/main/packages/magento-graphql/typePolicies.ts

I'd like for the typePolicies file to be automatically generated for all uid fields or Apollo Client to automatically look for uid fields.

Describe alternatives you've considered

Currently it can happen that there is a very obtrusive error that isn't shown clearly.

paales avatar Mar 17 '22 16:03 paales