Skip to content

Commit

Permalink
feat: update graphql-upload
Browse files Browse the repository at this point in the history
  • Loading branch information
SimenB committed Jun 13, 2022
1 parent 1e4a472 commit ef93932
Show file tree
Hide file tree
Showing 5 changed files with 39 additions and 163 deletions.
4 changes: 2 additions & 2 deletions index.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import fp from 'fastify-plugin'
import { processRequest, UploadOptions } from 'graphql-upload'
import processRequest, { ProcessRequestOptions } from 'graphql-upload/processRequest.js'

import type { FastifyPluginCallback } from 'fastify'

Expand All @@ -9,7 +9,7 @@ declare module 'fastify' {
}
}

const mercuriusGQLUpload: FastifyPluginCallback<UploadOptions> = (
const mercuriusGQLUpload: FastifyPluginCallback<ProcessRequestOptions> = (
fastify,
options,
done
Expand Down
5 changes: 2 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,8 @@
"test": "tap --ts --100 test/*.test.ts"
},
"dependencies": {
"@types/graphql-upload": "^8.0.11",
"fastify-plugin": "^3.0.1",
"graphql-upload": "^13.0.0"
"graphql-upload": "^15.0.1"
},
"devDependencies": {
"@types/node": "^16.11.39",
Expand All @@ -50,6 +49,6 @@
"typescript": "^4.7.3"
},
"peerDependencies": {
"graphql": "0.13.1 - 16"
"graphql": "^16.3.0"
}
}
185 changes: 29 additions & 156 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion test/build-server.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import fastify from 'fastify'
import GQL from 'mercurius'
import { GraphQLUpload } from 'graphql-upload'
import GraphQLUpload from 'graphql-upload/GraphQLUpload.js'
import mercuriusGQLUpload from '../index'

const schema = /* GraphQL */ `
Expand Down
6 changes: 5 additions & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,11 @@

/* Advanced Options */
"skipLibCheck": true /* Skip type checking of declaration files. */,
"forceConsistentCasingInFileNames": true /* Disallow inconsistently-cased references to the same file. */
"forceConsistentCasingInFileNames": true, /* Disallow inconsistently-cased references to the same file. */

/* https://github.com/jaydenseric/graphql-upload/issues/282#issuecomment-1142691771 */
"allowJs": true,
"maxNodeModuleJsDepth": 10
},
"include": ["index.ts"]
}

0 comments on commit ef93932

Please sign in to comment.