feat: Update to Hono v3.0.0 (#53)
* feat: Update to Hono v3.0.0 * feat(graphql-server): Update package to v0.3.0 * feat(graphql-server): Get the raw request * test(graphql-server): Update to Hono v3.0.0 * feat(graphql-server): Run `yarn prerelease` * docs(graphql-server): Add changesetpull/54/head
parent
148f114cb6
commit
ca1a2103a7
|
@ -0,0 +1,5 @@
|
|||
---
|
||||
'@hono/graphql-server': minor
|
||||
---
|
||||
|
||||
feat: bump up Hono to version 3.0.0
|
|
@ -53,3 +53,7 @@ app.use(
|
|||
|
||||
app.fire()
|
||||
```
|
||||
|
||||
## Author
|
||||
|
||||
Minghe Huang <h.minghe@gmail.com>
|
||||
|
|
|
@ -17,7 +17,7 @@ import type {
|
|||
GraphQLFormattedError,
|
||||
} from 'https://cdn.skypack.dev/graphql@16.6.0?dts'
|
||||
|
||||
import type { Context } from 'https://deno.land/x/hono@v2.7.5/mod.ts'
|
||||
import type { Context } from 'https://deno.land/x/hono@v3.0.0/mod.ts'
|
||||
import { parseBody } from './parse-body.ts'
|
||||
|
||||
export type RootResolver = (ctx?: Context) => Promise<unknown> | unknown
|
||||
|
@ -46,7 +46,7 @@ export const graphqlServer = (options: Options) => {
|
|||
|
||||
let params: GraphQLParams
|
||||
try {
|
||||
params = await getGraphQLParams(c.req)
|
||||
params = await getGraphQLParams(c.req.raw)
|
||||
} catch (e) {
|
||||
if (e instanceof Error) {
|
||||
console.error(`${e.stack || e.message}`)
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import { buildSchema } from 'https://cdn.skypack.dev/graphql@16.6.0?dts'
|
||||
import { assertEquals } from 'https://deno.land/std@0.149.0/testing/asserts.ts'
|
||||
import { Hono } from 'https://deno.land/x/hono@v2.7.5/mod.ts'
|
||||
import { assertEquals } from 'https://deno.land/std@0.177.0/testing/asserts.ts'
|
||||
import { Hono } from 'https://deno.land/x/hono@v3.0.0/mod.ts'
|
||||
import { graphqlServer } from '../deno_dist/index.ts'
|
||||
|
||||
Deno.test('graphql-server', async (t) => {
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "@hono/graphql-server",
|
||||
"version": "0.2.0",
|
||||
"version": "0.3.0",
|
||||
"repository": "git@github.com:honojs/middleware.git",
|
||||
"author": "Minghe Huang <h.minghe@gmail.com>",
|
||||
"main": "dist/index.js",
|
||||
|
@ -27,7 +27,7 @@
|
|||
"release": "np"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"hono": "^2.6.1"
|
||||
"hono": "^3.0.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"graphql": "^16.5.0"
|
||||
|
@ -46,7 +46,7 @@
|
|||
"eslint-plugin-flowtype": "^8.0.3",
|
||||
"eslint-plugin-import": "^2.26.0",
|
||||
"eslint-plugin-node": "^11.1.0",
|
||||
"hono": "^2.6.1",
|
||||
"hono": "^3.0.0",
|
||||
"jest": "^28.1.2",
|
||||
"jest-environment-miniflare": "^2.6.0",
|
||||
"np": "^7.6.2",
|
||||
|
|
|
@ -46,7 +46,7 @@ export const graphqlServer = (options: Options) => {
|
|||
|
||||
let params: GraphQLParams
|
||||
try {
|
||||
params = await getGraphQLParams(c.req)
|
||||
params = await getGraphQLParams(c.req.raw)
|
||||
} catch (e) {
|
||||
if (e instanceof Error) {
|
||||
console.error(`${e.stack || e.message}`)
|
||||
|
|
Loading…
Reference in New Issue