@graphcommerce/graphql 3.0.7 → 3.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,20 @@
1
1
  # Change Log
2
2
 
3
+ ## 3.1.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [#1399](https://github.com/graphcommerce-org/graphcommerce/pull/1399) [`fb277d8e1`](https://github.com/graphcommerce-org/graphcommerce/commit/fb277d8e1e3612c5e9cf890a30d19cfd1ff70542) Thanks [@paales](https://github.com/paales)! - Now using [@graphql-yoga](https://github.com/dotansimha/graphql-yoga) for GraphQL which has full support for [envelop](https://www.envelop.dev/) plugins.
8
+
9
+ * [#1399](https://github.com/graphcommerce-org/graphcommerce/pull/1399) [`fb277d8e1`](https://github.com/graphcommerce-org/graphcommerce/commit/fb277d8e1e3612c5e9cf890a30d19cfd1ff70542) Thanks [@paales](https://github.com/paales)! - Added a new @graphcommerce/cli package to generate the mesh so it can be generated _inside_ the @graphcommerce/graphql-mesh package to allow for better future extensibility.
10
+
11
+ ### Patch Changes
12
+
13
+ - [#1399](https://github.com/graphcommerce-org/graphcommerce/pull/1399) [`da0ae7d02`](https://github.com/graphcommerce-org/graphcommerce/commit/da0ae7d0236e4908ba0bf0fa16656be516e841d4) Thanks [@paales](https://github.com/paales)! - Updated dependencies
14
+
15
+ - Updated dependencies [[`da0ae7d02`](https://github.com/graphcommerce-org/graphcommerce/commit/da0ae7d0236e4908ba0bf0fa16656be516e841d4)]:
16
+ - @graphcommerce/graphql-codegen-near-operation-file@3.0.10
17
+
3
18
  ## 3.0.7
4
19
 
5
20
  ### Patch Changes
@@ -1,6 +1,6 @@
1
1
  import { LocalStorageWrapper, CachePersistor } from 'apollo3-cache-persist'
2
2
  import { mergeDeep, ApolloCache, ApolloClient, NormalizedCacheObject } from './apollo'
3
- import type { TypedTypePolicies } from './generated/types'
3
+ import type { StrictTypedTypePolicies } from './generated/types'
4
4
  import { MigrateCache, migrateCacheHandler } from './migrateCache'
5
5
  import { getTypePoliciesVersion } from './typePolicies'
6
6
 
@@ -15,7 +15,7 @@ export const persistCache = () => persistor?.persist()
15
15
  export function createCacheReviver(
16
16
  client: ApolloClient<NormalizedCacheObject>,
17
17
  createCache: () => ApolloCache<NormalizedCacheObject>,
18
- policies: TypedTypePolicies[],
18
+ policies: StrictTypedTypePolicies[],
19
19
  migrations: MigrateCache[],
20
20
  incommingState: NormalizedCacheObject = {},
21
21
  ) {
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@graphcommerce/graphql",
3
3
  "homepage": "https://www.graphcommerce.org/",
4
4
  "repository": "github:graphcommerce-org/graphcommerce",
5
- "version": "3.0.7",
5
+ "version": "3.1.0",
6
6
  "sideEffects": false,
7
7
  "main": "index.ts",
8
8
  "prettier": "@graphcommerce/prettier-config-pwa",
@@ -13,14 +13,14 @@
13
13
  }
14
14
  },
15
15
  "devDependencies": {
16
- "@graphcommerce/eslint-config-pwa": "^4.1.4",
17
- "@graphcommerce/prettier-config-pwa": "^4.0.5",
16
+ "@graphcommerce/eslint-config-pwa": "^4.1.5",
17
+ "@graphcommerce/prettier-config-pwa": "^4.0.6",
18
18
  "@graphcommerce/typescript-config-pwa": "^4.0.2",
19
- "@playwright/test": "^1.20.1"
19
+ "@playwright/test": "^1.21.1"
20
20
  },
21
21
  "dependencies": {
22
22
  "@apollo/client": "^3.5.10",
23
- "@graphcommerce/graphql-codegen-near-operation-file": "3.0.9",
23
+ "@graphcommerce/graphql-codegen-near-operation-file": "3.0.10",
24
24
  "@graphcommerce/graphql-codegen-relay-optimizer-plugin": "3.0.6",
25
25
  "@graphql-codegen/add": "3.1.1",
26
26
  "@graphql-codegen/fragment-matcher": "3.2.1",
@@ -32,6 +32,6 @@
32
32
  "@graphql-codegen/typescript-document-nodes": "2.2.8",
33
33
  "@graphql-codegen/typescript-operations": "2.3.5",
34
34
  "apollo3-cache-persist": "^0.14.0",
35
- "graphql": "^16.3.0"
35
+ "graphql": "16.3.0"
36
36
  }
37
37
  }
@@ -33,9 +33,9 @@ export async function waitForGraphQlResponse<Q, V>(
33
33
  const test = base.extend<ApolloClientTest>({
34
34
  apolloClient: async ({}, use) => {
35
35
  const client = new ApolloClient({
36
- uri: process.env.NEXT_PUBLIC_GRAPHQL_ENDPOINT || 'http://localhost:3000/api/graphql',
36
+ uri: process.env.NEXT_PUBLIC_GRAPHQL_ENDPOINT,
37
37
  credentials: 'same-origin',
38
- cache: new InMemoryCache({}),
38
+ cache: new InMemoryCache(),
39
39
  })
40
40
  await use(client)
41
41
  },
package/typePolicies.ts CHANGED
@@ -1,7 +1,7 @@
1
+ import type { StrictTypedTypePolicies } from '@graphcommerce/graphql'
1
2
  import { mergeDeep } from './apollo'
2
- import type { TypedTypePolicies } from './generated/types'
3
3
 
4
- export const mergeTypePolicies = (policies: TypedTypePolicies[]): TypedTypePolicies =>
4
+ export const mergeTypePolicies = (policies: StrictTypedTypePolicies[]): StrictTypedTypePolicies =>
5
5
  mergeDeep(...policies)
6
6
 
7
7
  const generateIdentifyer = (s: string) =>
@@ -14,5 +14,5 @@ const generateIdentifyer = (s: string) =>
14
14
  }, 0),
15
15
  ).toString()
16
16
 
17
- export const getTypePoliciesVersion = (policies: TypedTypePolicies[]) =>
17
+ export const getTypePoliciesVersion = (policies: StrictTypedTypePolicies[]) =>
18
18
  generateIdentifyer(JSON.stringify(policies))