graphql-yoga
4.0.5
Patch Changes
- #3004 (opens in a new tab)
bf602edf(opens in a new tab) Thanks @EmrysMyrddin (opens in a new tab)! - Fix dynamic schema function type and documentation
4.0.4
Patch Changes
- #2958 (opens in a new tab)
5f182006(opens in a new tab) Thanks @enisdenjo (opens in a new tab)! - Start SSE stream with a ping
4.0.3
Patch Changes
5efb8250(opens in a new tab) Thanks @n1ru4l (opens in a new tab)! - dependencies updates:- Updated dependency
@whatwg-node/fetch@^0.9.7↗︎ (opens in a new tab) (from^0.9.0, independencies) - Updated dependency
@whatwg-node/server@^0.9.1↗︎ (opens in a new tab) (from^0.8.1, independencies)
- Updated dependency
4.0.2
Patch Changes
- #2872 (opens in a new tab)
ce6d2465(opens in a new tab) Thanks @nescalante (opens in a new tab)! - Avoid overriding http status on extensions when using a plugin that modifies error prop
4.0.1
Patch Changes
-
#2866 (opens in a new tab)
bb739b05(opens in a new tab) Thanks @renovate (opens in a new tab)! - dependencies updates:- Updated dependency
lru-cache@^10.0.0↗︎ (opens in a new tab) (from^9.0.0, independencies)
- Updated dependency
-
#2869 (opens in a new tab)
8f7d7abc(opens in a new tab) Thanks @enisdenjo (opens in a new tab)! - Properly serialise GraphQLError on graphql-js v15
4.0.0
Major Changes
-
#2767 (opens in a new tab)
4228c1d5(opens in a new tab) Thanks @renovate (opens in a new tab)! - Drop support for Node.js 14. Require Node.js>=16. -
#2776 (opens in a new tab)
34ecb4bb(opens in a new tab) Thanks @enisdenjo (opens in a new tab)! - Drop unused graphiql optionsdefaultVariableEditorOpenandheaderEditorEnabled -
#2810 (opens in a new tab)
ec318fe6(opens in a new tab) Thanks @n1ru4l (opens in a new tab)! - Remove support for executing Subscription operations over the incremental delivery response protocol (multipart/mixed) -
#2775 (opens in a new tab)
dd699c4b(opens in a new tab) Thanks @enisdenjo (opens in a new tab)! - Subscriptions use GraphQL over SSE "distinct connections mode" -
#2767 (opens in a new tab)
4228c1d5(opens in a new tab) Thanks @renovate (opens in a new tab)! - Events without an event payload will now always havenullas the event payload instead ofundefined. -
#2777 (opens in a new tab)
0522c740(opens in a new tab) Thanks @enisdenjo (opens in a new tab)! - Parse and validation cache are now under a single optionparserAndValidationCache
Patch Changes
-
#2720 (opens in a new tab)
cc370691(opens in a new tab) Thanks @n1ru4l (opens in a new tab)! - Skip validation caching when there is noschemaspecified. This previously caused a cryptic error message when reaching execution/validation without a schema. Now the missing schema error will actually originate from within thevalidatefunction instead. -
#2726 (opens in a new tab)
b309ca0d(opens in a new tab) Thanks @ardatan (opens in a new tab)! - RespecttoJSONin the thrown errors. -
Updated dependencies [
4228c1d5(opens in a new tab),4228c1d5(opens in a new tab)]:- @graphql-yoga/subscription@4.0.0
- @graphql-yoga/logger@1.0.0
3.9.1
Patch Changes
-
#2682 (opens in a new tab)
e1a60e21(opens in a new tab) Thanks @renovate (opens in a new tab)! - dependencies updates:- Updated dependency
@graphql-tools/executor@^0.0.17↗︎ (opens in a new tab) (from^0.0.16, independencies)
- Updated dependency
-
#2686 (opens in a new tab)
c50ea51c(opens in a new tab) Thanks @n1ru4l (opens in a new tab)! - dependencies updates:- Updated dependency
@graphql-tools/executor@^0.0.18↗︎ (opens in a new tab) (from^0.0.17, independencies) - Updated dependency
@graphql-tools/schema@^9.0.18↗︎ (opens in a new tab) (from^9.0.0, independencies)
- Updated dependency
-
#2686 (opens in a new tab)
c50ea51c(opens in a new tab) Thanks @n1ru4l (opens in a new tab)! - Prevent errors thrown from subscription source crashing the Node.js process and instead log the error to the console, then terminate the client subscription.
3.9.0
Minor Changes
- #2675 (opens in a new tab)
aff69200(opens in a new tab) Thanks @enisdenjo (opens in a new tab)! - Only well-formatted GraphQL-over-HTTP requests use 200 when accepting application/json
3.8.1
Patch Changes
-
#2652 (opens in a new tab)
ebb65b14(opens in a new tab) Thanks @renovate (opens in a new tab)! - dependencies updates:- Updated dependency
@graphql-tools/executor@^0.0.16↗︎ (opens in a new tab) (from^0.0.15, independencies)
- Updated dependency
-
#2676 (opens in a new tab)
528941cb(opens in a new tab) Thanks @n1ru4l (opens in a new tab)! - Prefercontent-type: multipart/mixedovercontent-type: text/event-streamwhen the client sendsaccept: text/event-stream, multipart/mixed.
3.8.0
Minor Changes
- #2445 (opens in a new tab)
09d23a4b(opens in a new tab) Thanks @ardatan (opens in a new tab)! - GraphQL SSE Distinct Connections mode support withlegacySse = falseflag
Patch Changes
-
#2602 (opens in a new tab)
99b72696(opens in a new tab) Thanks @n1ru4l (opens in a new tab)! - dependencies updates:- Updated dependency
lru-cache@^7.14.1↗︎ (opens in a new tab) (from^8.0.0, independencies)
- Updated dependency
-
#2602 (opens in a new tab)
99b72696(opens in a new tab) Thanks @n1ru4l (opens in a new tab)! - revertlru-cacheversion to7.x.x, as8.x.xbroke Node.js 14 support.
3.7.3
Patch Changes
- #2559 (opens in a new tab)
46e75917(opens in a new tab) Thanks @renovate (opens in a new tab)! - dependencies updates:- Updated dependency
lru-cache@^8.0.0↗︎ (opens in a new tab) (from^7.14.1, independencies)
- Updated dependency
3.7.2
Patch Changes
- #2528 (opens in a new tab)
7ad50529(opens in a new tab) Thanks @renovate (opens in a new tab)! - dependencies updates:- Updated dependency
@graphql-yoga/logger@^0.0.1↗︎ (opens in a new tab) (from0.0.1, independencies) - Updated dependency
@whatwg-node/server@^0.7.3↗︎ (opens in a new tab) (from^0.7.1, independencies)
- Updated dependency
3.7.1
Patch Changes
-
#2481 (opens in a new tab)
9fdd94b5(opens in a new tab) Thanks @ardatan (opens in a new tab)! - dependencies updates:- Updated dependency
@whatwg-node/server@^0.7.1↗︎ (opens in a new tab) (from^0.6.7, independencies)
- Updated dependency
-
#2496 (opens in a new tab)
47b1c4a4(opens in a new tab) Thanks @renovate (opens in a new tab)! - dependencies updates:- Updated dependency
@graphql-tools/executor@^0.0.15↗︎ (opens in a new tab) (from^0.0.14, independencies)
- Updated dependency
-
#2527 (opens in a new tab)
02ac055c(opens in a new tab) Thanks @ardatan (opens in a new tab)! - dependencies updates:- Added dependency
@graphql-yoga/logger@0.0.0↗︎ (opens in a new tab) (todependencies)
- Added dependency
-
#2527 (opens in a new tab)
02ac055c(opens in a new tab) Thanks @ardatan (opens in a new tab)! - Release logger seperately -
Updated dependencies [
02ac055c(opens in a new tab)]:- @graphql-yoga/logger@0.0.1
3.7.0
Minor Changes
- #2459 (opens in a new tab)
9e743db5(opens in a new tab) Thanks @ardatan (opens in a new tab)! - Respecthttpin the extensions just like error extensions
Patch Changes
-
#2470 (opens in a new tab)
23d1b26c(opens in a new tab) Thanks @n1ru4l (opens in a new tab)! - dependencies updates:- Updated dependency
@envelop/validation-cache@^5.1.2↗︎ (opens in a new tab) (from^5.0.5, independencies)
- Updated dependency
-
#2470 (opens in a new tab)
23d1b26c(opens in a new tab) Thanks @n1ru4l (opens in a new tab)! - bump range of@envelop/validation-cachefor fixing javascript runtime compatibility (usage of node-only globalrequire).
3.6.1
Patch Changes
3c8c8434(opens in a new tab) Thanks @ardatan (opens in a new tab)! - Replace LRU caching with lazy URL construction, avoid unnecessaryparseandvalidateinvocation and CORS
3.6.0
Minor Changes
- #2393 (opens in a new tab)
790330be(opens in a new tab) Thanks @ardatan (opens in a new tab)! - Decrease request latency by improving the validation and parser cache algorithm.
Patch Changes
-
#2388 (opens in a new tab)
6bc1410f(opens in a new tab) Thanks @ardatan (opens in a new tab)! - Improve URL parsing performance -
#2375 (opens in a new tab)
ddb2607d(opens in a new tab) Thanks @renovate (opens in a new tab)! - dependencies updates:- Updated dependency
@graphql-tools/executor@0.0.13↗︎ (opens in a new tab) (from0.0.12, independencies)
- Updated dependency
-
#2388 (opens in a new tab)
6bc1410f(opens in a new tab) Thanks @ardatan (opens in a new tab)! - dependencies updates:- Added dependency
lru-cache@^7.14.1↗︎ (opens in a new tab) (todependencies)
- Added dependency
-
#2392 (opens in a new tab)
1caac99b(opens in a new tab) Thanks @renovate (opens in a new tab)! - dependencies updates:- Updated dependency
@whatwg-node/fetch@0.6.8↗︎ (opens in a new tab) (from0.6.5, independencies) - Updated dependency
@whatwg-node/server@0.6.3↗︎ (opens in a new tab) (from0.5.11, independencies)
- Updated dependency
-
#2393 (opens in a new tab)
790330be(opens in a new tab) Thanks @ardatan (opens in a new tab)! - dependencies updates:- Updated dependency
@graphql-tools/utils@^9.2.1↗︎ (opens in a new tab) (from^9.0.1, independencies) - Removed dependency
@envelop/parser-cache@^5.0.4↗︎ (opens in a new tab) (fromdependencies)
- Updated dependency
-
#2394 (opens in a new tab)
7587d5c5(opens in a new tab) Thanks @renovate (opens in a new tab)! - dependencies updates:- Updated dependency
@graphql-tools/executor@^0.0.14↗︎ (opens in a new tab) (from^0.0.13, independencies)
- Updated dependency
-
#2405 (opens in a new tab)
cc0d3899(opens in a new tab) Thanks @renovate (opens in a new tab)! - dependencies updates:- Updated dependency
@whatwg-node/fetch@^0.7.0↗︎ (opens in a new tab) (from^0.6.9, independencies) - Updated dependency
@whatwg-node/server@^0.6.5↗︎ (opens in a new tab) (from^0.6.4, independencies)
- Updated dependency
-
#2411 (opens in a new tab)
a747d249(opens in a new tab) Thanks @ardatan (opens in a new tab)! - dependencies updates:- Updated dependency
@whatwg-node/fetch@^0.8.1↗︎ (opens in a new tab) (from^0.7.0, independencies) - Updated dependency
@whatwg-node/server@^0.6.7↗︎ (opens in a new tab) (from^0.6.5, independencies)
- Updated dependency
-
#2417 (opens in a new tab)
2933fc89(opens in a new tab) Thanks @ardatan (opens in a new tab)! - dependencies updates:- Updated dependency
@whatwg-node/fetch@^0.7.1↗︎ (opens in a new tab) (from^0.7.0, independencies)
- Updated dependency
-
#2421 (opens in a new tab)
543e490b(opens in a new tab) Thanks @ardatan (opens in a new tab)! - dependencies updates:- Updated dependency
@whatwg-node/fetch@^0.8.1↗︎ (opens in a new tab) (from^0.7.1, independencies) - Updated dependency
@whatwg-node/server@^0.6.7↗︎ (opens in a new tab) (from^0.6.5, independencies)
- Updated dependency
3.5.1
Patch Changes
- #2137 (opens in a new tab)
3a8446df(opens in a new tab) Thanks @n1ru4l (opens in a new tab)! - Close multipart responses correctly
3.5.0
Minor Changes
-
#2364 (opens in a new tab)
03597a5a(opens in a new tab) Thanks @n1ru4l (opens in a new tab)! - export the yoga default format error function.import { createYoga, maskError } from 'graphql-yoga' const yoga = createYoga({ maskedErrors: { maskError(error, message, isDev) { if (error?.extensions?.code === 'DOWNSTREAM_SERVICE_ERROR') { return error } return maskError(error, message, isDev) } } })
3.4.1
Patch Changes
-
#2254 (opens in a new tab)
00843174(opens in a new tab) Thanks @ardatan (opens in a new tab)! - dependencies updates:- Updated dependency
@whatwg-node/fetch@0.6.5↗︎ (opens in a new tab) (from0.6.2, independencies) - Updated dependency
@whatwg-node/server@0.5.11↗︎ (opens in a new tab) (from0.5.8, independencies)
- Updated dependency
-
#2254 (opens in a new tab)
00843174(opens in a new tab) Thanks @ardatan (opens in a new tab)! - Use the new fetch implementation
3.4.0
Patch Changes
-
#2331 (opens in a new tab)
76c1ecb9(opens in a new tab) Thanks @enisdenjo (opens in a new tab)! - Properly serialise response extension arrays, nullish values and dates -
#2276 (opens in a new tab)
8cd8b5a5(opens in a new tab) Thanks @renovate (opens in a new tab)! - dependencies updates:- Updated dependency
@whatwg-node/server@0.5.5↗︎ (opens in a new tab) (from0.5.4, independencies)
- Updated dependency
-
#2313 (opens in a new tab)
6e8bddba(opens in a new tab) Thanks @renovate (opens in a new tab)! - dependencies updates:- Updated dependency
@whatwg-node/fetch@0.6.2↗︎ (opens in a new tab) (from0.6.1, independencies) - Updated dependency
@whatwg-node/server@0.5.6↗︎ (opens in a new tab) (from0.5.5, independencies)
- Updated dependency
-
#2316 (opens in a new tab)
6ee252db(opens in a new tab) Thanks @renovate (opens in a new tab)! - dependencies updates:- Updated dependency
@graphql-tools/executor@0.0.12↗︎ (opens in a new tab) (from0.0.11, independencies)
- Updated dependency
-
#2335 (opens in a new tab)
8f139e15(opens in a new tab) Thanks @renovate (opens in a new tab)! - dependencies updates:- Updated dependency
@whatwg-node/server@0.5.7↗︎ (opens in a new tab) (from0.5.6, independencies)
- Updated dependency
-
#2340 (opens in a new tab)
9beef914(opens in a new tab) Thanks @renovate (opens in a new tab)! - dependencies updates:- Updated dependency
@whatwg-node/server@0.5.8↗︎ (opens in a new tab) (from0.5.7, independencies)
- Updated dependency
-
#2240 (opens in a new tab)
c46d75e8(opens in a new tab) Thanks @enisdenjo (opens in a new tab)! - Check HTTP request method after user-land plugins -
#2278 (opens in a new tab)
f9ab8a70(opens in a new tab) Thanks @ardatan (opens in a new tab)! - Use normalized URL instead of string -
Updated dependencies [
fe4a2aca(opens in a new tab)]:- @graphql-yoga/subscription@3.1.0
3.3.1
Patch Changes
- #2275 (opens in a new tab)
d4dab446(opens in a new tab) Thanks @ardatan (opens in a new tab)! - Do not pass an explicit endpoint for GraphiQL
3.3.0
Minor Changes
- #2266 (opens in a new tab)
3e5f688f(opens in a new tab) Thanks @ardatan (opens in a new tab)! - Accept URL patterns like/:pathand*ingraphqlEndpoint
Patch Changes
-
#2266 (opens in a new tab)
3e5f688f(opens in a new tab) Thanks @ardatan (opens in a new tab)! - dependencies updates:- Updated dependency
@whatwg-node/fetch@0.6.1↗︎ (opens in a new tab) (from0.5.4, independencies) - Updated dependency
@whatwg-node/server@0.5.3↗︎ (opens in a new tab) (from0.5.1, independencies)
- Updated dependency
-
#2269 (opens in a new tab)
8b288a23(opens in a new tab) Thanks @renovate (opens in a new tab)! - dependencies updates:- Updated dependency
@whatwg-node/server@0.5.4↗︎ (opens in a new tab) (from0.5.3, independencies)
- Updated dependency
3.2.1
Patch Changes
- #2257 (opens in a new tab)
5528d312(opens in a new tab) Thanks @ardatan (opens in a new tab)! - Handle errors thrown in onRequest correctly
3.2.0
Minor Changes
- #2150 (opens in a new tab)
290c7f7f(opens in a new tab) Thanks @ardatan (opens in a new tab)! - Ping the client every 12 seconds to keep the connection alive
Patch Changes
-
#2213 (opens in a new tab)
a86aaa0f(opens in a new tab) Thanks @renovate (opens in a new tab)! - dependencies updates:- Updated dependency
@graphql-tools/executor@0.0.11↗︎ (opens in a new tab) (from0.0.9, independencies) - Updated dependency
@whatwg-node/fetch@0.5.4↗︎ (opens in a new tab) (from0.5.3, independencies) - Updated dependency
@whatwg-node/server@0.5.1↗︎ (opens in a new tab) (from0.4.17, independencies)
- Updated dependency
-
#2250 (opens in a new tab)
82f58934(opens in a new tab) Thanks @ardatan (opens in a new tab)! - More accurate HTTP status code when unsupported media type is sent as a request body.Before it was returning
400: Bad RequestwithRequest is not validtext body in the response but now it returns415: Unsupported Media Typewith an empty body.Also see this unit test; https://github.com/dotansimha/graphql-yoga/pull/2250/files#diff-78bcfa5f6d33aceeabdacd26e353641fea6fd125838ed0e1565762221568c777R380 (opens in a new tab)
3.1.2
Patch Changes
-
#2231 (opens in a new tab)
c5b1cc46(opens in a new tab) Thanks @n1ru4l (opens in a new tab)! - dependencies updates:- Updated dependency
@envelop/parser-cache@^5.0.4↗︎ (opens in a new tab) (from5.0.4, independencies) - Updated dependency
@envelop/validation-cache@^5.0.5↗︎ (opens in a new tab) (from5.0.4, independencies)
- Updated dependency
-
#2238 (opens in a new tab)
c152105e(opens in a new tab) Thanks @ardatan (opens in a new tab)! - Do not call CORS headers factory twice -
#2206 (opens in a new tab)
26d780cd(opens in a new tab) Thanks @ardatan (opens in a new tab)! - Correct Mask Error Factory signature -
#2239 (opens in a new tab)
d2958781(opens in a new tab) Thanks @davidruisinger (opens in a new tab)! - Add content-length: 0 header if 204 is returned by OPTIONS request
3.1.1
Patch Changes
- #2179 (opens in a new tab)
534780c9(opens in a new tab) Thanks @ardatan (opens in a new tab)! - Add missing .js extension to type imports
3.1.0
Minor Changes
- #2145 (opens in a new tab)
ea81e1dd(opens in a new tab) Thanks @n1ru4l (opens in a new tab)! - Skip nullish query parameters in assertion.
Patch Changes
-
#2165 (opens in a new tab)
86fe453c(opens in a new tab) Thanks @ardatan (opens in a new tab)! - ExportuseErrorHandlerto revert the unexpected breaking change -
#2145 (opens in a new tab)
ea81e1dd(opens in a new tab) Thanks @n1ru4l (opens in a new tab)! - Avoid unnecessary iteration within internals
3.0.3
Patch Changes
- #2156 (opens in a new tab)
491ef5da(opens in a new tab) Thanks @renovate (opens in a new tab)! - dependencies updates:- Updated dependency
@envelop/core@3.0.4↗︎ (opens in a new tab) (from3.0.3, independencies) - Updated dependency
@envelop/parser-cache@5.0.4↗︎ (opens in a new tab) (from5.0.3, independencies) - Updated dependency
@envelop/validation-cache@5.0.4↗︎ (opens in a new tab) (from5.0.3, independencies)
- Updated dependency
3.0.2
Patch Changes
-
#2154 (opens in a new tab)
0007c58d(opens in a new tab) Thanks @ardatan (opens in a new tab)! - Only Yoga's errors are now 200 when content-type is application/json -
#2147 (opens in a new tab)
39a8fe89(opens in a new tab) Thanks @ardatan (opens in a new tab)! - Bump @whatwg-node/server to fix the conflict issue between webworker & dom TS typing libs
3.0.1
Patch Changes
- #2125 (opens in a new tab)
d63fe841(opens in a new tab) Thanks @enisdenjo (opens in a new tab)! - application/json is the default when accept is missing until watershed
3.0.0
Major Changes
-
2e0c4824(opens in a new tab) Thanks @b4s36t4 (opens in a new tab)! - 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.
-
#2012 (opens in a new tab)
720898db(opens in a new tab) Thanks @saihaj (opens in a new tab)! - Remove.injectmethod to mock testing. Users should replace to usefetchmethod for testing.Checkout our docs on testing https://www.the-guild.dev/graphql/yoga-server/v3/features/testing (opens in a new tab).
import { createYoga } from 'graphql-yoga' import { schema } from './schema' const yoga = createYoga({ schema }) - const { response, executionResult } = await yoga.inject({ - document: "query { ping }", - }) + const response = await yoga.fetch('http://yoga/graphql', { + method: 'POST', + headers: { + 'Content-Type': 'application/json', + }, + body: JSON.stringify({ + query: 'query { ping }', + }), + }) + const executionResult = await response.json() console.assert(response.status === 200, 'Response status should be 200') console.assert(executionResult.data.ping === 'pong',`Expected 'pong'`) -
#1753 (opens in a new tab)
eeaced00(opens in a new tab) Thanks @ardatan (opens in a new tab)! -schemano longer accepts an object oftypeDefsandresolversbut instead you can usecreateSchemato create a GraphQL schema. -
#1516 (opens in a new tab)
209b1620(opens in a new tab) Thanks @ardatan (opens in a new tab)! - Now it is possible to decide the returnedContent-Typeby specifying theAcceptheader. So ifAcceptheader hastext/event-streamwithoutapplication/json, Yoga respects that returnstext/event-streaminstead ofapplication/json. -
#1808 (opens in a new tab)
02d2aecd(opens in a new tab) Thanks @enisdenjo (opens in a new tab)! - DropreadinessCheckEndpointin favor of theuseReadinessCheckplugin -
#1473 (opens in a new tab)
c4b3a9c8(opens in a new tab) Thanks @ardatan (opens in a new tab)! - ReplaceGraphQLYogaErrorin favor ofGraphQLError.Check the documentation to see how to use
GraphQLError(opens in a new tab) -
#1660 (opens in a new tab)
71554172(opens in a new tab) Thanks @saihaj (opens in a new tab)! - Update to the latest version of the envelopuseMaskedErrorplugin.- Removed
handleValidationErrorsandhandleParseErrors - Renamed
formatErrortomaskError
- Removed
-
#2091 (opens in a new tab)
1d508495(opens in a new tab) Thanks @ardatan (opens in a new tab)! - Export only specific utilities from@envelop/core.
Minor Changes
-
#1966 (opens in a new tab)
6e250209(opens in a new tab) Thanks @saihaj (opens in a new tab)! - Use@graphql-tools/executoras a default GraphQL Executor in favor ofgraphql-js. -
#1497 (opens in a new tab)
1d7f810a(opens in a new tab) Thanks @ardatan (opens in a new tab)! - 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 (opens in a new tab)
098e139f(opens in a new tab) Thanks @ardatan (opens in a new tab)! - - Batching RFC support withbatchingLimitoption to enable batching with an exact limit of requests per batch.- New
onParamshook that takes a singleGraphQLParamsobject - Changes in
onRequestParseandonRequestParseDonehook - Now
onRequestParseDonereceives the exact object that is passed by the request parser so it can beGraphQLParamsor an array ofGraphQLParamsso useonParamsif you need to manipulate batched execution params individually.
- New
Patch Changes
-
#1997 (opens in a new tab)
8773a27f(opens in a new tab) Thanks @saihaj (opens in a new tab)! - Defer and Stream Support -
#2024 (opens in a new tab)
9f991a27(opens in a new tab) Thanks @enisdenjo (opens in a new tab)! - Ensure all parsing failures inGraphQLScalarTypeare caught and handled with 400 status code. -
#1920 (opens in a new tab)
cebca219(opens in a new tab) Thanks @enisdenjo (opens in a new tab)! - Handle edge case whereContent-Typeheader provides a list like;Content-Type: application/json, text/plain, */* -
#1609 (opens in a new tab)
74e1f830(opens in a new tab) Thanks @enisdenjo (opens in a new tab)! -usePreventMutationViaGETdoesn't do assertion if it is notYogaContext, so it is possible to use Yoga's Envelop instance with other server implementations likegraphql-ws. -
#1567 (opens in a new tab)
e7a47b56(opens in a new tab) Thanks @n1ru4l (opens in a new tab)! - Handle invalid POST body gracefully. Rejectnull, non-object bodies or invalid JSON bodies. -
#1911 (opens in a new tab)
5f5b1160(opens in a new tab) Thanks @enisdenjo (opens in a new tab)! - Handle cases where user supplies a malformed/unexpected context. Preventing GraphQL Yoga to crash and existing prematurely. -
73e56068(opens in a new tab) Thanks @ardatan (opens in a new tab)! - Fix cancellation logic for defer/stream queries. -
#1609 (opens in a new tab)
74e1f830(opens in a new tab) Thanks @enisdenjo (opens in a new tab)! - Expose readonlygraphqlEndpointinYogaServerInstanceconst yoga = createYoga({ /*...*/ }) console.log(yoga.graphqlEndpoint) // /graphql by default -
#1844 (opens in a new tab)
b079c93b(opens in a new tab) Thanks @ardatan (opens in a new tab)! - All unexpected errors even if they are masked/wrapped The HTTP status code will be determined by the specific protocol the client is sending."Unexpected error." means an Error that is not an instance of GraphQLError or an instance of GraphQLError with an
originalErrorthat is not an instance of GraphQLError recursively. -
#1988 (opens in a new tab)
b19a9104(opens in a new tab) Thanks @ardatan (opens in a new tab)! - Respect the order of mime types given in the accept header by the client. -
#1616 (opens in a new tab)
1d5cde96(opens in a new tab) Thanks @ardatan (opens in a new tab)! - Allow the content typeapplication/graphql-response+jsonas theAcceptheader value. -
#1775 (opens in a new tab)
44878a5b(opens in a new tab) Thanks @enisdenjo (opens in a new tab)! - Improve the context type for server and request context. -
Updated dependencies [
b2407c6a(opens in a new tab)]:- @graphql-yoga/subscription@3.0.0
3.0.0-next.12
Patch Changes
73e56068(opens in a new tab) Thanks @ardatan (opens in a new tab)! - Fix cancellation logic for defer/stream queries
3.0.0-next.11
Major Changes
-
#2012 (opens in a new tab)
720898db(opens in a new tab) Thanks @saihaj (opens in a new tab)! - Remove.injectmethod to mock testing. Users should replace to usefetchmethod for testing. Checkout our docs on testing https://www.the-guild.dev/graphql/yoga-server/v3/features/testing (opens in a new tab).import { createYoga } from 'graphql-yoga' import { schema } from './schema' const yoga = createYoga({ schema }) - const { response, executionResult } = await yoga.inject({ - document: "query { ping }", - }) + const response = await yoga.fetch('http://localhost:4000/graphql', { + method: 'POST', + headers: { + 'Content-Type': 'application/json', + }, + body: JSON.stringify({ + query: 'query { ping }', + }), + }) + const executionResult = await response.json() console.assert(response.status === 200, 'Response status should be 200') console.assert(executionResult.data.ping === 'pong',`Expected 'pong'`)
Patch Changes
-
#2024 (opens in a new tab)
9f991a27(opens in a new tab) Thanks @enisdenjo (opens in a new tab)! - Ensure all parsing failures inGraphQLScalarTypeare caught and handled with 400 status code. -
#2058 (opens in a new tab)
ef191eee(opens in a new tab) Thanks @enisdenjo (opens in a new tab)! - Simplify landing page and fix links
3.0.0-next.10
Patch Changes
-
#1997 (opens in a new tab)
8773a27f(opens in a new tab) Thanks @saihaj (opens in a new tab)! - introduce a new plugin for defer and stream instead of making it default in yoga -
#1996 (opens in a new tab)
cedde92f(opens in a new tab) Thanks @enisdenjo (opens in a new tab)! - Support older version of GraphQLjs -
#1992 (opens in a new tab)
bf69a561(opens in a new tab) Thanks @saihaj (opens in a new tab)! - inline functions to support multiple version of graphql-js
3.0.0-next.9
Minor Changes
- #1936 (opens in a new tab)
87a6c333(opens in a new tab) Thanks @renovate (opens in a new tab)! - Engine and graphql-js version agnostic Defer/Stream support
Patch Changes
- #1988 (opens in a new tab)
b19a9104(opens in a new tab) Thanks @ardatan (opens in a new tab)! - Respect the order of mime types given in the accept header by the client
3.0.0-next.8
Minor Changes
- #1966 (opens in a new tab)
6e250209(opens in a new tab) Thanks @saihaj (opens in a new tab)! - use custom executor
3.0.0-next.7
Patch Changes
-
#1920 (opens in a new tab)
cebca219(opens in a new tab) Thanks @enisdenjo (opens in a new tab)! - Handle edge case where Content-Type header provides a list -
#1911 (opens in a new tab)
5f5b1160(opens in a new tab) Thanks @enisdenjo (opens in a new tab)! - Handle cases where user supplies a malformed/unexpected context
3.0.0-next.6
Patch Changes
- #1903 (opens in a new tab)
dc45a7b5(opens in a new tab) Thanks @saihaj (opens in a new tab)! - remove graphql tools as dep
3.0.0-next.5
Major Changes
-
#1660 (opens in a new tab)
71554172(opens in a new tab) Thanks @saihaj (opens in a new tab)! - update to EnvelopuseMaskedErrorplugin- Removed handleValidationErrors and handleParseErrors
- Renamed formatError to maskError
Checkout envelop docs for more details https://www.the-guild.dev/graphql/envelop/v3/guides/migrating-from-v2-to-v3#8-update-options-for-usemaskederrors-plugin (opens in a new tab)
3.0.0-next.4
Major Changes
- #1808 (opens in a new tab)
02d2aecd(opens in a new tab) Thanks @enisdenjo (opens in a new tab)! - DropreadinessCheckEndpointand introduceuseReadinessCheckplugin
Patch Changes
-
#1844 (opens in a new tab)
b079c93b(opens in a new tab) Thanks @ardatan (opens in a new tab)! - - All unexpected errors even if they are masked/wrapped, HTTP status code will be set to 500."Unexpected error" means an Error that is not an instance of GraphQLError or an instance of GraphQLError with an
originalErrorthat is not an instance of GraphQLError recursively.
3.0.0-next.3
Patch Changes
64e06d74(opens in a new tab) Thanks @ardatan (opens in a new tab)! - Fix execute/stop button
3.0.0-next.2
Patch Changes
-
#1794 (opens in a new tab)
8c674c36(opens in a new tab) Thanks @ardatan (opens in a new tab)! - dependencies updates:- Updated dependency
@whatwg-node/fetch@0.4.6↗︎ (opens in a new tab) (from0.4.5, independencies) - Updated dependency
@whatwg-node/server@0.4.10↗︎ (opens in a new tab) (from0.4.7, independencies) - Added dependency
@graphql-tools/utils@8.12.0↗︎ (opens in a new tab) (todependencies)
- Updated dependency
3.0.0-next.1
Patch Changes
- #1775 (opens in a new tab)
44878a5b(opens in a new tab) Thanks @enisdenjo (opens in a new tab)! - Context typings improvements
3.0.0-next.0
Major Changes
-
#1660 (opens in a new tab)
2e0c4824(opens in a new tab) Thanks @saihaj (opens in a new tab)! - 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 (opens in a new tab)
f46addd7(opens in a new tab) Thanks @saihaj (opens in a new tab)! - See the migration guide for more information; -
#1753 (opens in a new tab)
eeaced00(opens in a new tab) Thanks @ardatan (opens in a new tab)! -schemano longer accepts an object oftypeDefsandresolversbut instead you can usecreateSchemato create a GraphQL schema. -
#1516 (opens in a new tab)
209b1620(opens in a new tab) Thanks @ardatan (opens in a new tab)! - Now it is possible to decide the returnedContent-Typeby specifying theAcceptheader. So ifAcceptheader hastext/event-streamwithoutapplication/json, Yoga respects that returnstext/event-streaminstead ofapplication/json. -
#1473 (opens in a new tab)
c4b3a9c8(opens in a new tab) Thanks @ardatan (opens in a new tab)! - BREAKING: RemoveGraphQLYogaErrorin favor ofGraphQLErrorCheck the documentation to see how to useGraphQLError(opens in a new tab)
Minor Changes
-
#1610 (opens in a new tab)
f4b23387(opens in a new tab) Thanks @ardatan (opens in a new tab)! - Pass the parsed request as-is and validate the final GraphQLParams in useCheckGraphQLParams -
#1497 (opens in a new tab)
1d7f810a(opens in a new tab) Thanks @ardatan (opens in a new tab)! - 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 (opens in a new tab)
098e139f(opens in a new tab) Thanks @ardatan (opens in a new tab)! - - Batching RFC support withbatchingLimitoption to enable batching with an exact limit of requests per batch.- New
onParamshook that takes a singleGraphQLParamsobject - Changes in
onRequestParseandonRequestParseDonehook -
- Now
onRequestParseDonereceives the exact object that is passed by the request parser so it can beGraphQLParamsor an array ofGraphQLParamsso useonParamsif you need to manipulate batched execution params individually.
- Now
- New
Patch Changes
-
#1609 (opens in a new tab)
74e1f830(opens in a new tab) Thanks @enisdenjo (opens in a new tab)! -usePreventMutationViaGETdoesn't do assertion if it is notYogaContext, so it is possible to use Yoga's Envelop instance with other server implementations likegraphql-ws. -
#1567 (opens in a new tab)
e7a47b56(opens in a new tab) Thanks @n1ru4l (opens in a new tab)! - Handle invalid POST body gracefully; - Rejectnull- Reject non-object body - Reject invalid JSON body -
#1609 (opens in a new tab)
74e1f830(opens in a new tab) Thanks @enisdenjo (opens in a new tab)! - Expose readonlygraphqlEndpointinYogaServerInstanceconst yoga = createYoga({ /*...*/ }) console.log(yoga.graphqlEndpoint) // /graphql by default -
#1616 (opens in a new tab)
1d5cde96(opens in a new tab) Thanks @ardatan (opens in a new tab)! - Supportapplication/graphql-response+jsonasAccepted content type for the response -
Updated dependencies [
b2407c6a(opens in a new tab)]:- @graphql-yoga/subscription@3.0.0-next.0
2.13.11
Patch Changes
- Updated dependencies []:
- @graphql-yoga/node@2.13.11
2.13.10
Patch Changes
- Updated dependencies
[
779b55ee(opens in a new tab)]:- @graphql-yoga/node@2.13.10
2.13.9
Patch Changes
- Updated dependencies []:
- @graphql-yoga/node@2.13.9
2.13.8
Patch Changes
- Updated dependencies []:
- @graphql-yoga/node@2.13.8
2.13.7
Patch Changes
- Updated dependencies
[
e4e8ade(opens in a new tab),94b41f3(opens in a new tab)]:- @graphql-yoga/node@2.13.7
2.13.6
Patch Changes
- eecf24c: Fix CommonJS TypeScript resolution with
moduleResolutionnode16ornodenext - Updated dependencies [eecf24c]
- @graphql-yoga/node@2.13.6
2.13.5
Patch Changes
- Updated dependencies [c00dad3]
- @graphql-yoga/node@2.13.5
2.13.4
Patch Changes
- @graphql-yoga/node@2.13.4
2.13.3
Patch Changes
- Updated dependencies [639607d]
- @graphql-yoga/node@2.13.3
2.13.2
Patch Changes
- @graphql-yoga/node@2.13.2
2.13.1
Patch Changes
- @graphql-yoga/node@2.13.1
2.13.0
Patch Changes
- @graphql-yoga/node@2.13.0
2.12.0
Patch Changes
- @graphql-yoga/node@2.12.0
2.11.2
Patch Changes
- Updated dependencies [ca5f940]
- @graphql-yoga/node@2.11.2
2.11.1
Patch Changes
- Updated dependencies [9248df8]
- @graphql-yoga/node@2.11.1
2.11.0
Patch Changes
- Updated dependencies [8947657]
- @graphql-yoga/node@2.11.0
2.10.0
Minor Changes
- 7de07cd: Support TypeScript ECMA script resolution. More information on https://devblogs.microsoft.com/typescript/announcing-typescript-4-7/#ecmascript-module-support-in-node-js (opens in a new tab)
Patch Changes
- Updated dependencies [7de07cd]
- Updated dependencies [8922c3b]
- @graphql-yoga/node@2.10.0
2.9.2
Patch Changes
- @graphql-yoga/node@2.9.2
2.9.1
Patch Changes
- @graphql-yoga/node@2.9.1
2.9.0
Patch Changes
- Updated dependencies [06652c7]
- Updated dependencies [2d3c54c]
- @graphql-yoga/node@2.9.0
2.8.0
Patch Changes
- @graphql-yoga/node@2.8.0
2.7.0
Patch Changes
- @graphql-yoga/node@2.7.0
2.6.1
Patch Changes
- Updated dependencies [0224bf9]
- @graphql-yoga/node@2.6.1
2.6.0
Patch Changes
- @graphql-yoga/node@2.6.0
2.5.0
Patch Changes
- Updated dependencies [8b6d896]
- @graphql-yoga/node@2.5.0
2.4.1
Patch Changes
- @graphql-yoga/node@2.4.1
2.4.0
Patch Changes
- Updated dependencies [28e24c3]
- Updated dependencies [13f96db]
- @graphql-yoga/node@2.4.0
2.3.0
Patch Changes
- @graphql-yoga/node@2.3.0
2.2.1
Patch Changes
- Updated dependencies [32e2e40]
- @graphql-yoga/node@2.2.1
2.2.0
Patch Changes
- Updated dependencies [1d4fe42]
- @graphql-yoga/node@2.2.0
2.1.0
Patch Changes
- Updated dependencies [4077773]
- Updated dependencies [2739db2]
- Updated dependencies [cd9394e]
- @graphql-yoga/node@2.1.0
2.0.0
Major Changes
-
b6dd3f1: The goal is to provide a fully-featured, simple to set up, performant and extendable server. Some key features:
- GraphQL-over-HTTP (opens in a new tab) spec compliant
- Extend the GraphQL request flow using
envelop(opens in a new tab) - File uploads (via GraphQL multipart request specification)
- GraphQL Subscriptions (using SSE (opens in a new tab))
- Logging using Pino (opens in a new tab)
- Improved TypeScript Support
- Try out experimental GraphQL features such as
@deferand@stream
-
de1693e: trigger release
Minor Changes
-
6750eff: rename
GraphQLServerErrortoGraphQLYogaError. -
0edf1f8: feat: options for GraphiQL
-
d414f95: BREAKING Set
maskedErrorsvalue totrueby default for safer defaults.BREAKING Remove
disableIntrospection. Please useuseDisableIntrospectionfrom@envelop/disable-introspectioninstead. (opens in a new tab) -
36af58e: export renderGraphiQL function
-
bea2dcc: align envelop types
-
fc1f2c7: make options optional
-
fb894da: Rename createGraphQLServer to createServer
-
1a20e1e: Export everything from @envelop/core and export GraphQLFile scalar
-
d078e84: Drop fastify and use node-http package
-
6d60ebf: add tabs to GraphiQL
-
9554f81: Add PubSub utility.
-
95e0ac0: feat: remove unnecessary Upload scalar types
-
dcaea56: add missing tslib dependency
Patch Changes
-
6effd5d: fix(node): handle response cancellation correctly
-
3d54829: enhance: move W3C changes
-
0edf1f8: feat(cli): binds GraphQL Config to GraphQL Yoga
-
a10a16c: Node Server implementation has been moved to
@graphql-yoga/nodepackage.CLI implementation has been moved to
graphql-yogapackage. -
5b6f025: feat(yoga-cli): fallback to default schema and add mock parameter
-
Updated dependencies [d414f95]
-
Updated dependencies [133f8e9]
-
Updated dependencies [14c93a7]
-
Updated dependencies [ec777b1]
-
Updated dependencies [dcaea56]
-
Updated dependencies [b0b244b]
-
Updated dependencies [cfec14b]
-
Updated dependencies [433558f]
-
Updated dependencies [3c82b57]
-
Updated dependencies [f5f06f4]
-
Updated dependencies [dcaea56]
-
Updated dependencies [8ab60cf]
-
Updated dependencies [433558f]
-
Updated dependencies [5fba736]
-
Updated dependencies [62e8c07]
-
Updated dependencies [ce60a48]
-
Updated dependencies [a8b619b]
-
Updated dependencies [6d60ebf]
-
Updated dependencies [44ad1b3]
-
Updated dependencies [0424fe3]
-
Updated dependencies [de1693e]
-
Updated dependencies [d60f79f]
-
Updated dependencies [dcaea56]
-
Updated dependencies [daeea82]
-
Updated dependencies [a10a16c]
- @graphql-yoga/node@0.1.0
2.0.0-beta.8
Minor Changes
- 6d60ebf: add tabs to GraphiQL
Patch Changes
- 5b6f025: feat(yoga-cli): fallback to default schema and add mock parameter
- Updated dependencies [3c82b57]
- Updated dependencies [6d60ebf]
- Updated dependencies [0424fe3]
- Updated dependencies [d60f79f]
- @graphql-yoga/node@0.1.0-beta.8
2.0.0-beta.7
Patch Changes
- Updated dependencies [14c93a7]
- Updated dependencies [ec777b1]
- Updated dependencies [8ab60cf]
- @graphql-yoga/node@0.1.0-beta.7
2.0.0-beta.6
Patch Changes
- @graphql-yoga/node@0.1.0-beta.6
2.0.0-beta.5
Patch Changes
- Updated dependencies [cfec14b]
- Updated dependencies [5fba736]
- Updated dependencies [44ad1b3]
- @graphql-yoga/node@0.1.0-beta.5
2.0.0-beta.4
Patch Changes
- Updated dependencies [433558f]
- Updated dependencies [433558f]
- @graphql-yoga/node@0.1.0-beta.4
2.0.0-beta.3
Patch Changes
- Updated dependencies [62e8c07]
- @graphql-yoga/node@0.1.0-beta.3
2.0.0-beta.2
Patch Changes
- Updated dependencies [daeea82]
- @graphql-yoga/node@0.0.1-beta.2
2.0.0-beta.1
Patch Changes
- @graphql-yoga/node@0.0.1-beta.1
2.0.0-beta.0
Major Changes
- de1693e: trigger release
Patch Changes
- Updated dependencies [de1693e]
- @graphql-yoga/node@0.0.1-beta.0
2.0.0-alpha.12
Minor Changes
- dcaea56: add missing tslib dependency
Patch Changes
- Updated dependencies [133f8e9]
- Updated dependencies [dcaea56]
- Updated dependencies [f5f06f4]
- Updated dependencies [dcaea56]
- Updated dependencies [ce60a48]
- Updated dependencies [dcaea56]
- @graphql-yoga/node@0.1.0-alpha.4
2.0.0-alpha.11
Patch Changes
- @graphql-yoga/node@0.1.0-alpha.3
2.0.0-alpha.10
Patch Changes
- Updated dependencies [b0b244b]
- @graphql-yoga/node@0.1.0-alpha.2
2.0.0-alpha.9
Patch Changes
- @graphql-yoga/node@0.1.0-alpha.1
2.0.0-alpha.8
Minor Changes
-
6750eff: rename
GraphQLServerErrortoGraphQLYogaError. -
d414f95: BREAKING Set
maskedErrorsvalue totrueby default for safer defaults.BREAKING Remove
disableIntrospection. Please useuseDisableIntrospectionfrom@envelop/disable-introspectioninstead. (opens in a new tab) -
bea2dcc: align envelop types
-
fc1f2c7: make options optional
Patch Changes
-
6effd5d: fix(node): handle response cancellation correctly
-
a10a16c: Node Server implementation has been moved to
@graphql-yoga/nodepackage.CLI implementation has been moved to
graphql-yogapackage. -
Updated dependencies [d414f95]
-
Updated dependencies [a10a16c]
- @graphql-yoga/node@0.1.0-alpha.0
2.0.0-alpha.7
Patch Changes
- 3d54829: enhance: move W3C changes
- Updated dependencies [3d54829]
- @graphql-yoga/common@0.2.0-alpha.6
- @graphql-yoga/handler@0.2.0-alpha.3
2.0.0-alpha.6
Minor Changes
- 36af58e: export renderGraphiQL function
Patch Changes
- Updated dependencies [36af58e]
- @graphql-yoga/common@0.2.0-alpha.5
- @graphql-yoga/handler@0.2.0-alpha.2
2.0.0-alpha.5
Patch Changes
- Updated dependencies [d2c2d18]
- @graphql-yoga/common@0.2.0-alpha.4
2.0.0-alpha.4
Minor Changes
- fb894da: Rename createGraphQLServer to createServer
Patch Changes
- Updated dependencies [e99ec3e]
- Updated dependencies [fb894da]
- @graphql-yoga/subscription@0.1.0-alpha.0
- @graphql-yoga/common@0.2.0-alpha.3
2.0.0-alpha.3
Minor Changes
- 0edf1f8: feat: options for GraphiQL
- 1a20e1e: Export everything from @envelop/core and export GraphQLFile scalar
- 9554f81: Add PubSub utility.
- 95e0ac0: feat: remove unnecessary Upload scalar types
Patch Changes
- Updated dependencies [0edf1f8]
- Updated dependencies [95e0ac0]
- @graphql-yoga/common@0.2.0-alpha.2
- @graphql-yoga/handler@0.2.0-alpha.1
2.0.0-alpha.2
Patch Changes
- Updated dependencies [5de1acf]
- @graphql-yoga/common@0.2.0-alpha.1
2.0.0-alpha.1
Minor Changes
- d078e84: Drop fastify and use node-http package
Patch Changes
- Updated dependencies [d078e84]
- Updated dependencies [d8f8a81]
- @graphql-yoga/common@0.2.0-alpha.0
- @graphql-yoga/handler@0.2.0-alpha.0
2.0.0-alpha.0
Major Changes
-
b6dd3f1: The goal is to provide a fully-featured, simple to set up, performant and extendable server. Some key features:
- GraphQL-over-HTTP (opens in a new tab) spec compliant
- Extend the GraphQL request flow using
envelop(opens in a new tab) - File uploads (via GraphQL multipart request specification)
- GraphQL Subscriptions (using SSE (opens in a new tab))
- Logging using Pino (opens in a new tab)
- Improved TypeScript Support
- Try out experimental GraphQL features such as
@deferand@stream