Skip to content

Commit

Permalink
Merge branch 'master' into madshall-patch-1
Browse files Browse the repository at this point in the history
  • Loading branch information
madshall authored Jun 6, 2024
2 parents 62ea4a7 + 23fcd39 commit 9b67e7e
Show file tree
Hide file tree
Showing 16 changed files with 39 additions and 20 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,6 @@ jobs:
- run: npm run test:coverage -- --silent
- run: npm run check-types
- run: npm run build
- uses: coverallsapp/github-action@v2.2.1
- uses: coverallsapp/github-action@v2.3.0
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
2 changes: 1 addition & 1 deletion examples/create-react-app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"dependencies": {
"graphql-hooks": "^7.0.0",
"graphql-hooks-memcache": "^3.2.0",
"json-graphql-server": "^2.3.1",
"json-graphql-server": "^3.0.1",
"prop-types": "^15.7.2",
"react": "^18.0.0",
"react-app-polyfill": "^2.0.0",
Expand Down
4 changes: 2 additions & 2 deletions examples/fastify-ssr/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
"author": "",
"license": "ISC",
"dependencies": {
"@fastify/static": "^6.5.0",
"@fastify/static": "^7.0.4",
"babel-plugin-dynamic-import-node": "^2.2.0",
"fastify": "^4.2.0",
"graphql-hooks": "^7.0.0",
Expand All @@ -44,7 +44,7 @@
"@babel/preset-react": "^7.0.0",
"babel-loader": "^9.1.0",
"nodemon": "^3.0.1",
"pino-pretty": "^10.0.0",
"pino-pretty": "^11.1.0",
"webpack": "^5.64.4",
"webpack-cli": "^5.0.1",
"webpack-manifest-plugin": "^4.0.2",
Expand Down
2 changes: 1 addition & 1 deletion examples/persisted-queries/server/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"author": "",
"license": "MIT",
"dependencies": {
"@fastify/cors": "^8.0.0",
"@fastify/cors": "^9.0.1",
"apollo-server": "^3.6.7",
"fastify": "^4.2.0",
"graphql": "^16.6.0",
Expand Down
6 changes: 3 additions & 3 deletions examples/subscription/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,14 @@
"build": "webpack"
},
"dependencies": {
"@fastify/cors": "^8.0.0",
"@fastify/static": "^6.5.0",
"@fastify/cors": "^9.0.1",
"@fastify/static": "^7.0.4",
"babel-plugin-dynamic-import-node": "^2.2.0",
"fastify": "^4.2.0",
"graphql": "^16.6.0",
"graphql-hooks": "^7.0.0",
"graphql-hooks-memcache": "^3.2.0",
"lowdb": "^6.0.1",
"lowdb": "^7.0.1",
"mercurius": "^14.0.0",
"mqemitter-redis": "^5.0.0",
"react": "^18.0.0",
Expand Down
1 change: 1 addition & 0 deletions examples/typescript/src/gql/fragment-masking.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/* eslint-disable */
import { ResultOf, DocumentTypeDecoration, TypedDocumentNode } from '@graphql-typed-document-node/core';
import { FragmentDefinitionNode } from 'graphql';
import { Incremental } from './graphql';
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
"@rollup/plugin-commonjs": "^25.0.7",
"@rollup/plugin-node-resolve": "^15.2.3",
"@rollup/plugin-terser": "^0.4.4",
"@testing-library/cypress": "^9.0.0",
"@testing-library/cypress": "^10.0.2",
"@types/jest": "^29.0.3",
"babel-jest": "^29.0.1",
"cross-env": "^7.0.3",
Expand Down
4 changes: 2 additions & 2 deletions packages/babel-plugin-extract-gql/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,9 @@
"strings"
],
"dependencies": {
"@fastify/cors": "^8.0.0",
"@fastify/cors": "^9.0.1",
"fastify": "^4.2.0",
"pkg-dir": "^7.0.0"
"pkg-dir": "^8.0.0"
},
"repository": {
"type": "git",
Expand Down
5 changes: 2 additions & 3 deletions packages/graphql-hooks/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,19 +33,18 @@
"author": "Brian Mullan <bmullan91@gmail.com>",
"license": "Apache-2.0",
"peerDependencies": {
"graphql": "^16.8.1",
"react": "^17.0.0 || ^18.0.0"
},
"dependencies": {
"@0no-co/graphql.web": "^1.0.7",
"@aws-crypto/sha256-browser": "^5.2.0",
"@graphql-typed-document-node/core": "^3.2.0",
"buffer": "^6.0.3",
"events": "^3.3.0",
"extract-files": "^11.0.0",
"use-deep-compare-effect": "^1.8.1"
},
"devDependencies": {
"@testing-library/react": "^14.0.0",
"@testing-library/react": "^15.0.7",
"@types/extract-files": "^8.1.1",
"cross-env": "^7.0.3",
"formdata-node": "^4.3.2",
Expand Down
2 changes: 1 addition & 1 deletion packages/graphql-hooks/src/createRefetchMutationsMap.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { TypedDocumentNode } from '@graphql-typed-document-node/core'
import type { TypedDocumentNode } from './types/typedDocumentNode'

import {
RefetchAfterMutationItem,
Expand Down
19 changes: 19 additions & 0 deletions packages/graphql-hooks/src/types/typedDocumentNode.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
import { DocumentNode } from '@0no-co/graphql.web'

export interface DocumentTypeDecoration<TResult, TVariables> {
/**
* This type is used to ensure that the variables you pass in to the query are assignable to Variables
* and that the Result is assignable to whatever you pass your result to. The method is never actually
* implemented, but the type is valid because we list it as optional
*/
__apiType?: (variables: TVariables) => TResult
}
export interface TypedDocumentNode<
TResult = {
[key: string]: any
},
TVariables = {
[key: string]: any
}
> extends DocumentNode,
DocumentTypeDecoration<TResult, TVariables> {}
2 changes: 1 addition & 1 deletion packages/graphql-hooks/src/useClientRequest.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React from 'react'
import { TypedDocumentNode } from '@graphql-typed-document-node/core'
import { TypedDocumentNode } from './types/typedDocumentNode'

import ClientContext from './ClientContext'
import { Events } from './events'
Expand Down
2 changes: 1 addition & 1 deletion packages/graphql-hooks/src/useManualQuery.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { TypedDocumentNode } from '@graphql-typed-document-node/core'
import type { TypedDocumentNode } from './types/typedDocumentNode'

import {
FetchData,
Expand Down
2 changes: 1 addition & 1 deletion packages/graphql-hooks/src/useMutation.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { TypedDocumentNode } from '@graphql-typed-document-node/core'
import type { TypedDocumentNode } from './types/typedDocumentNode'

import useClientRequest from './useClientRequest'
import {
Expand Down
2 changes: 1 addition & 1 deletion packages/graphql-hooks/src/useQuery.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React from 'react'
import type { TypedDocumentNode } from '@graphql-typed-document-node/core'
import type { TypedDocumentNode } from './types/typedDocumentNode'

import ClientContext from './ClientContext'
import createRefetchMutationsMap from './createRefetchMutationsMap'
Expand Down
2 changes: 1 addition & 1 deletion packages/graphql-hooks/src/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import type {
DocumentNode,
OperationDefinitionNode
} from 'graphql/language/ast'
import { Kind, print } from 'graphql'
import { Kind, print } from '@0no-co/graphql.web'

/**
* Pipe with support for async functions
Expand Down

0 comments on commit 9b67e7e

Please sign in to comment.