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

Upcoming Release Changes (refs/heads/v3) (v3) #1748

Merged
merged 1 commit into from
Sep 21, 2022
Merged

Conversation

github-actions[bot]
Copy link
Contributor

@github-actions github-actions bot commented Sep 19, 2022

This PR was opened by the Changesets release GitHub action. When you're ready to do a release, you can merge this and the packages will be published to npm automatically. If you're not ready to do a release yet, that's fine, whenever you add more changesets to v3, this PR will be updated.

⚠️⚠️⚠️⚠️⚠️⚠️

v3 is currently in pre mode so this branch has prereleases rather than normal releases. If you want to exit prereleases, run changeset pre exit on v3.

⚠️⚠️⚠️⚠️⚠️⚠️

Releases

@graphql-yoga/[email protected]

Major Changes

@graphql-yoga/[email protected]

Major Changes

@graphql-yoga/[email protected]

Major Changes

Minor Changes

  • #1359 5629a5cb Thanks @ardatan! - New setResult helper is available in onRequestParseDone hook to set ExecutionResult 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 and useResultProcessor hooks use generics to get more type-safety.

Patch Changes

@graphql-yoga/[email protected]

Major Changes

Patch Changes

@graphql-yoga/[email protected]

Major Changes

[email protected]

Major Changes

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 with batchingLimit option to enable batching with an exact limit of requests per batch.

    • New onParams hook that takes a single GraphQLParams object
    • Changes in onRequestParse and onRequestParseDone hook
      • Now onRequestParseDone receives the exact object that is passed by the request parser so it can be GraphQLParams or an array of GraphQLParams so use onParams if you need to manipulate batched execution params individually.

Patch Changes

  • #1609 74e1f830 Thanks @enisdenjo! - usePreventMutationViaGET doesn't do assertion if it is not YogaContext, so it is possible to use Yoga's Envelop instance with other server implementations like graphql-ws.

  • #1567 e7a47b56 Thanks @n1ru4l! - Handle invalid POST body gracefully; - Reject null - Reject non-object body - Reject invalid JSON body

  • #1609 74e1f830 Thanks @enisdenjo! - Expose readonly graphqlEndpoint in YogaServerInstance

    const yoga = createYoga({
      /*...*/
    })
    console.log(yoga.graphqlEndpoint) // /graphql by default
  • #1616 1d5cde96 Thanks @ardatan! - Support application/graphql-response+json as Accepted content type for the response

  • Updated dependencies [b2407c6a]:

@graphql-yoga/[email protected]

Major Changes

Patch Changes

@graphql-yoga/[email protected]

Major Changes

Patch Changes

@graphql-yoga/[email protected]

Major Changes

Patch Changes

@graphql-yoga/[email protected]

Major Changes

Patch Changes

@graphql-yoga/[email protected]

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 takes GraphQLParams and Request objects instead of GraphQL context as arguments.

      • type SessionIdFactory = (params: GraphQLParams, request: Request) => Maybe<string>
    • enabled function takes GraphQLParams and Request objects instead of GraphQL context as arguments.

      • type EnabledFn = (params: GraphQLParams, request: Request) => boolean

Patch Changes

@graphql-yoga/[email protected]

Major Changes

Patch Changes

@graphql-yoga/[email protected]

Patch Changes

[email protected]

Patch Changes

[email protected]

Patch Changes

[email protected]

Patch Changes

[email protected]

Patch Changes

[email protected]

Patch Changes

[email protected]

Patch Changes

[email protected]

Patch Changes

@github-actions github-actions bot force-pushed the changeset-release/v3 branch 6 times, most recently from 4afbf44 to 837e6da Compare September 21, 2022 08:45
@github-actions
Copy link
Contributor Author

github-actions bot commented Sep 21, 2022

✅ Benchmark Results

     ✓ no_errors
     ✓ expected_result

     checks.........................: 100.00% ✓ 199774      ✗ 0    
     data_received..................: 30 MB   992 kB/s
     data_sent......................: 12 MB   383 kB/s
     http_req_blocked...............: avg=1.1µs    min=799ns    med=1µs      max=246.79µs p(90)=1.3µs    p(95)=1.6µs   
     http_req_connecting............: avg=0ns      min=0s       med=0s       max=99.49µs  p(90)=0s       p(95)=0s      
   ✓ http_req_duration..............: avg=232.93µs min=164.79µs med=211.39µs max=18.04ms  p(90)=248.79µs p(95)=283.06µs
       { expected_response:true }...: avg=232.93µs min=164.79µs med=211.39µs max=18.04ms  p(90)=248.79µs p(95)=283.06µs
     http_req_failed................: 0.00%   ✓ 0           ✗ 99887
     http_req_receiving.............: avg=17.42µs  min=10.3µs   med=16.1µs   max=5.39ms   p(90)=19.9µs   p(95)=22.29µs 
     http_req_sending...............: avg=5.79µs   min=3.9µs    med=4.59µs   max=8.01ms   p(90)=6µs      p(95)=7.7µs   
     http_req_tls_handshaking.......: avg=0s       min=0s       med=0s       max=0s       p(90)=0s       p(95)=0s      
     http_req_waiting...............: avg=209.71µs min=142.59µs med=191.29µs max=17.95ms  p(90)=222.89µs p(95)=254.29µs
     http_reqs......................: 99887   3329.406468/s
     iteration_duration.............: avg=295.94µs min=218.99µs med=273.49µs max=18.48ms  p(90)=319.59µs p(95)=362.69µs
     iterations.....................: 99887   3329.406468/s
     vus............................: 1       min=1         max=1  
     vus_max........................: 1       min=1         max=1  

@github-actions github-actions bot force-pushed the changeset-release/v3 branch 5 times, most recently from 0a86c74 to 4d701bc Compare September 21, 2022 09:00
@ardatan ardatan merged commit 55bb456 into v3 Sep 21, 2022
@ardatan ardatan deleted the changeset-release/v3 branch September 21, 2022 09:09
This was referenced Sep 21, 2022
@saihaj saihaj mentioned this pull request Oct 17, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant