Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: update graphql-upload #5

Merged
merged 1 commit into from
Jun 13, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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"
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

}
}
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
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we can drop the changes to tsconfig.json if jaydenseric/graphql-upload#317 is accepted

},
"include": ["index.ts"]
}