apollographql / apollographql/apollo-utils

persisted-query-lists with apollo codegen throws operation mismatch

Open
#433 1 comment 0 reactions 1 assignee Claimed by @jerelmiller View on GitHub
bug
Dominant language
TypeScript
Stars
42
Forks
14
PR merge metrics
No merged PRs in 30d

Description

I am using @apollo/persisted-query-lists with apollo codegen

```
import type { PersistedQueryManifestConfig } from '@apollo/generate-persisted-query-manifest';
import { fromGraphQLCodegenPersistedDocuments } from '@apollo/generate-persisted-query-manifest';

const config: PersistedQueryManifestConfig = {
documents: fromGraphQLCodegenPersistedDocuments('./src/gql/persisted-documents.json'),
};

export default config;
```

however when I use the verification link i get operation mismatch errors on every query. i printed the queries that are being compared by the persisted-query-lists package and it looks like they dont match because the order of fields is different. is there something I can do to fix this issue or is there a bug?

```
query query GetSupRelationships {
loggedInShopifyShop {
id
relationshipsAsSup(tableFilterInput: {}) {
edges {
node {
id
hasSupSeenInstantAddUpsellModal
hasApprovedProposal
sk {
id
name
__typename
}
__typename
}
__typename
}
__typename
}
__typename
}
}
manifestoperation query GetSupRelationships {
loggedInShopifyShop {
id
relationshipsAsSup(tableFilterInput: {}) {
edges {
node {
hasApprovedProposal
hasSupSeenInstantAddUpsellModal
id
sk {
id
name
__typename
}
__typename
}
__typename
}
__typename
}
__typename
}
}
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.