release-1663751928815
版本发布时间: 2022-09-21 17:18:49
dotansimha/graphql-yoga最新发布版本:release-1723761948464(2024-08-16 06:45:48)
@graphql-yoga/apollo-link@1.0.0-next.0
Major Changes
@graphql-yoga/urql-exchange@1.0.0-next.0
Major Changes
@graphql-yoga/common@3.0.0-next.0
Major Changes
-
#1660
2e0c4824
Thanks @saihaj! - Drop Node 12 SupportGraphQL Yoga no longer supports Node 12 which is no longer an LTS version. GraphQL Yoga now needs Node 14 at least.
-
#1660
f46addd7
Thanks @saihaj! - See the migration guide for more information;
Minor Changes
-
#1359
5629a5cb
Thanks @ardatan! - NewsetResult
helper is available inonRequestParseDone
hook to setExecutionResult
before any GraphQL specific process.You can check
@graphql-yoga/plugin-response-cache
's implementation to see how it can be useful.Also now
onResultProcess
anduseResultProcessor
hooks use generics to get more type-safety.
Patch Changes
- Updated dependencies [
2e0c4824
,f46addd7
,f4b23387
,eeaced00
,74e1f830
,e7a47b56
,1d7f810a
,209b1620
,098e139f
,74e1f830
,c4b3a9c8
,1d5cde96
]:
@graphql-yoga/redis-event-target@1.0.0-next.0
Major Changes
-
#1761
b2407c6a
Thanks @ardatan! - BREAKING:- Drop
TypedEvent
in favor ofCustomEvent
- Use
@whatwg-node/events
as a ponyfill instead of@whatwg-node/fetch
- Drop
Patch Changes
- Updated dependencies [
b2407c6a
]:- @graphql-yoga/typed-event-target@1.0.0-next.0
@graphql-yoga/typed-event-target@1.0.0-next.0
Major Changes
-
#1761
b2407c6a
Thanks @ardatan! - BREAKING:- Drop
TypedEvent
in favor ofCustomEvent
- Use
@whatwg-node/events
as a ponyfill instead of@whatwg-node/fetch
- Drop
graphql-yoga@3.0.0-next.0
Major Changes
-
#1660
2e0c4824
Thanks @saihaj! - Drop Node 12 SupportGraphQL Yoga no longer supports Node 12 which is no longer an LTS version. GraphQL Yoga now needs Node 14 at least.
-
#1660
f46addd7
Thanks @saihaj! - See the migration guide for more information; -
#1753
eeaced00
Thanks @ardatan! -schema
no longer accepts an object oftypeDefs
andresolvers
but instead you can usecreateSchema
to create a GraphQL schema. -
#1516
209b1620
Thanks @ardatan! - Now it is possible to decide the returnedContent-Type
by specifying theAccept
header. So ifAccept
header hastext/event-stream
withoutapplication/json
, Yoga respects that returnstext/event-stream
instead ofapplication/json
. -
#1473
c4b3a9c8
Thanks @ardatan! - BREAKING: RemoveGraphQLYogaError
in favor ofGraphQLError
Check the documentation to see how to useGraphQLError
Minor Changes
-
#1610
f4b23387
Thanks @ardatan! - Pass the parsed request as-is and validate the final GraphQLParams in useCheckGraphQLParams -
#1497
1d7f810a
Thanks @ardatan! - Support a schema factory function that runs per request or a promise to be resolved before the first request.createYoga({ schema(request: Request) { return getSchemaForToken(request.headers.get('x-my-token')) }, })
async function buildSchemaAsync() { const typeDefs = await fs.promises.readFile('./schema.graphql', 'utf8') const resolvers = await import('./resolvers.js') return makeExecutableSchema({ typeDefs, resolvers }) } createYoga({ schema: buildSchemaAsync(), })
-
#1662
098e139f
Thanks @ardatan! - - Batching RFC support withbatchingLimit
option to enable batching with an exact limit of requests per batch.- New
onParams
hook that takes a singleGraphQLParams
object - Changes in
onRequestParse
andonRequestParseDone
hook -
- Now
onRequestParseDone
receives the exact object that is passed by the request parser so it can beGraphQLParams
or an array ofGraphQLParams
so useonParams
if you need to manipulate batched execution params individually.
- Now
- New
Patch Changes
-
#1609
74e1f830
Thanks @enisdenjo! -usePreventMutationViaGET
doesn't do assertion if it is notYogaContext
, so it is possible to use Yoga's Envelop instance with other server implementations likegraphql-ws
. -
#1567
e7a47b56
Thanks @n1ru4l! - Handle invalid POST body gracefully; - Rejectnull
- Reject non-object body - Reject invalid JSON body -
#1609
74e1f830
Thanks @enisdenjo! - Expose readonlygraphqlEndpoint
inYogaServerInstance
const yoga = createYoga({ /*...*/ }) console.log(yoga.graphqlEndpoint) // /graphql by default
-
#1616
1d5cde96
Thanks @ardatan! - Supportapplication/graphql-response+json
asAccept
ed content type for the response -
Updated dependencies [
b2407c6a
]:- @graphql-yoga/subscription@3.0.0-next.0
@graphql-yoga/node@3.0.0-next.0
Major Changes
-
#1660
2e0c4824
Thanks @saihaj! - Drop Node 12 SupportGraphQL Yoga no longer supports Node 12 which is no longer an LTS version. GraphQL Yoga now needs Node 14 at least.
-
#1660
f46addd7
Thanks @saihaj! - See the migration guide for more information;
Patch Changes
- Updated dependencies [
2e0c4824
,f46addd7
,f4b23387
,eeaced00
,74e1f830
,e7a47b56
,1d7f810a
,209b1620
,098e139f
,74e1f830
,c4b3a9c8
,1d5cde96
]:
@graphql-yoga/plugin-apollo-inline-trace@1.0.0-next.0
Major Changes
-
#1621
66b87b02
Thanks @enisdenjo! - Implementation of Apollo's federated inline tracing
Patch Changes
- Updated dependencies [
2e0c4824
,f46addd7
,f4b23387
,eeaced00
,74e1f830
,e7a47b56
,1d7f810a
,209b1620
,098e139f
,74e1f830
,c4b3a9c8
,1d5cde96
]:
@graphql-yoga/plugin-apq@1.0.0-next.0
Major Changes
-
#1137
3eebe6f2
Thanks @ardatan! - New Persisted Operations Plugin; https://www.graphql-yoga.com/v3/features/persisted-operationsNew Automatic Persisted Queries Plugin; https://www.graphql-yoga.com/v3/features/automatic-persisted-queries
Patch Changes
- Updated dependencies [
2e0c4824
,f46addd7
,f4b23387
,eeaced00
,74e1f830
,e7a47b56
,1d7f810a
,209b1620
,098e139f
,74e1f830
,c4b3a9c8
,1d5cde96
]:
@graphql-yoga/plugin-persisted-operations@1.0.0-next.0
Major Changes
-
#1137
3eebe6f2
Thanks @ardatan! - New Persisted Operations Plugin; https://www.graphql-yoga.com/v3/features/persisted-operationsNew Automatic Persisted Queries Plugin; https://www.graphql-yoga.com/v3/features/automatic-persisted-queries
Patch Changes
- Updated dependencies [
2e0c4824
,f46addd7
,f4b23387
,eeaced00
,74e1f830
,e7a47b56
,1d7f810a
,209b1620
,098e139f
,74e1f830
,c4b3a9c8
,1d5cde96
]:
@graphql-yoga/plugin-response-cache@1.0.0-next.0
Major Changes
-
#1359
5629a5cb
Thanks @ardatan! - New Response Cache Plugin!!!On top of
@envelop/response-cache
, this new plugin allows you to skip execution phase even before all the GraphQL execution phases immediately after the GraphQL request parameters is parsed by Yoga.Also it doesn't need to have
documentString
stored in somewhere in order to get it back during the execution to generate the cache key.All the features of the same except for the following:
-
session
factory function takesGraphQLParams
andRequest
objects instead of GraphQL context as arguments.-
type SessionIdFactory = (params: GraphQLParams, request: Request) => Maybe<string>
-
-
enabled
function takesGraphQLParams
andRequest
objects instead of GraphQL context as arguments.-
type EnabledFn = (params: GraphQLParams, request: Request) => boolean
-
-
Patch Changes
- Updated dependencies [
2e0c4824
,f46addd7
,f4b23387
,eeaced00
,74e1f830
,e7a47b56
,1d7f810a
,209b1620
,098e139f
,74e1f830
,c4b3a9c8
,1d5cde96
]:
@graphql-yoga/render-graphiql@3.0.0-next.0
Patch Changes
- Updated dependencies [
2e0c4824
,f46addd7
,f4b23387
,eeaced00
,74e1f830
,e7a47b56
,1d7f810a
,209b1620
,098e139f
,74e1f830
,c4b3a9c8
,1d5cde96
]:
@graphql-yoga/subscription@3.0.0-next.0
Major Changes
-
#1761
b2407c6a
Thanks @ardatan! - BREAKING:- Drop
TypedEvent
in favor ofCustomEvent
- Use
@whatwg-node/events
as a ponyfill instead of@whatwg-node/fetch
- Drop
Patch Changes
- Updated dependencies [
b2407c6a
]:- @graphql-yoga/typed-event-target@1.0.0-next.0