Skip to content

Upcoming Release Changes #2246

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

Merged
merged 1 commit into from
May 30, 2024
Merged

Upcoming Release Changes #2246

merged 1 commit into from
May 30, 2024

Conversation

theguild-bot
Copy link
Collaborator

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 main, this PR will be updated.

Releases

@envelop/response-cache@6.2.0

Minor Changes

  • #2238 430ee7d Thanks @ardatan! - Accept a factory function to cache that takes the context and returns the cache implementation

@envelop/response-cache-cloudflare-kv@1.0.0

Minor Changes

  • #2238 430ee7d Thanks @ardatan! - BREAKING: Now the cache implementation does not require the ExecutionContext or KVNamespace
    instance but only the name of the namespace

    import { createSchema, createYoga, YogaInitialContext } from "graphql-yoga";
    import { useResponseCache } from "@envelop/response-cache";
    import { createKvCache } from "@envelop/response-cache-cloudflare-kv";
    import { resolvers } from "./graphql-schema/resolvers.generated";
    import { typeDefs } from "./graphql-schema/typeDefs.generated";
    
    export type Env = {
      GRAPHQL_RESPONSE_CACHE: KVNamespace;
    };
    
    const graphqlServer = createYoga<Env & ExecutionContext>({
      schema: createSchema({ typeDefs, resolvers }),
      plugins: [
        useResponseCache({
          cache: createKvCache({
            KVName: "GRAPHQL_RESPONSE_CACHE",
            keyPrefix: "graphql" // optional
          }),
          session: () => null,
          includeExtensionMetadata: true,
          ttl: 1000 * 10 // 10 seconds
        })
      ]
    });
    
    export default {
      fetch: graphqlServer
    };

Patch Changes

  • Updated dependencies [430ee7d]:
    • @envelop/response-cache@6.2.0

Copy link
Contributor

🚀 Snapshot Release (rc)

The latest changes of this PR are available as rc on npm (based on the declared changesets):

Package Version Info
@envelop/response-cache 6.2.0-rc-20240530090315-3f53c9ae npm ↗︎ unpkg ↗︎
@envelop/response-cache-cloudflare-kv 1.0.0-rc-20240530090315-3f53c9ae npm ↗︎ unpkg ↗︎

Copy link
Contributor

💻 Website Preview

The latest changes are available as preview in: https://434f8e68.envelop.pages.dev

@theguild-bot
Copy link
Collaborator Author

✅ Benchmark Results

     ✓ no_errors
     ✓ expected_result

     checks.............................................: 100.00% ✓ 912620      ✗ 0     
     ✓ { mode:envelop-cache-and-no-internal-tracing }...: 100.00% ✓ 215422      ✗ 0     
     ✓ { mode:envelop-cache-jit }.......................: 100.00% ✓ 355858      ✗ 0     
     ✓ { mode:envelop-just-cache }......................: 100.00% ✓ 215230      ✗ 0     
     ✓ { mode:graphql-js }..............................: 100.00% ✓ 126110      ✗ 0     
     data_received......................................: 3.5 GB  29 MB/s
     data_sent..........................................: 199 MB  1.7 MB/s
     envelop_init.......................................: avg=0s      min=0s       med=0s     max=0s      p(90)=0s      p(95)=0s     
     ✓ { mode:envelop-cache-jit }.......................: avg=0s      min=0s       med=0s     max=0s      p(90)=0s      p(95)=0s     
     ✓ { mode:envelop-just-cache }......................: avg=0s      min=0s       med=0s     max=0s      p(90)=0s      p(95)=0s     
     ✓ { mode:graphql-js }..............................: avg=0s      min=0s       med=0s     max=0s      p(90)=0s      p(95)=0s     
     envelop_total......................................: avg=0s      min=0s       med=0s     max=0s      p(90)=0s      p(95)=0s     
     ✓ { mode:envelop-cache-jit }.......................: avg=0s      min=0s       med=0s     max=0s      p(90)=0s      p(95)=0s     
     ✓ { mode:envelop-just-cache }......................: avg=0s      min=0s       med=0s     max=0s      p(90)=0s      p(95)=0s     
     ✓ { mode:graphql-js }..............................: avg=0s      min=0s       med=0s     max=0s      p(90)=0s      p(95)=0s     
     event_loop_lag.....................................: avg=0s      min=0s       med=0s     max=0s      p(90)=0s      p(95)=0s     
     ✓ { mode:envelop-cache-and-no-internal-tracing }...: avg=0s      min=0s       med=0s     max=0s      p(90)=0s      p(95)=0s     
     ✓ { mode:envelop-cache-jit }.......................: avg=0s      min=0s       med=0s     max=0s      p(90)=0s      p(95)=0s     
     ✓ { mode:envelop-just-cache }......................: avg=0s      min=0s       med=0s     max=0s      p(90)=0s      p(95)=0s     
     ✓ { mode:graphql-js }..............................: avg=0s      min=0s       med=0s     max=0s      p(90)=0s      p(95)=0s     
     graphql_context....................................: avg=0s      min=0s       med=0s     max=0s      p(90)=0s      p(95)=0s     
     ✓ { mode:envelop-cache-jit }.......................: avg=0s      min=0s       med=0s     max=0s      p(90)=0s      p(95)=0s     
     ✓ { mode:envelop-just-cache }......................: avg=0s      min=0s       med=0s     max=0s      p(90)=0s      p(95)=0s     
     ✓ { mode:graphql-js }..............................: avg=0s      min=0s       med=0s     max=0s      p(90)=0s      p(95)=0s     
     graphql_execute....................................: avg=0s      min=0s       med=0s     max=0s      p(90)=0s      p(95)=0s     
     ✓ { mode:envelop-cache-jit }.......................: avg=0s      min=0s       med=0s     max=0s      p(90)=0s      p(95)=0s     
     ✓ { mode:envelop-just-cache }......................: avg=0s      min=0s       med=0s     max=0s      p(90)=0s      p(95)=0s     
     ✓ { mode:graphql-js }..............................: avg=0s      min=0s       med=0s     max=0s      p(90)=0s      p(95)=0s     
     graphql_parse......................................: avg=0s      min=0s       med=0s     max=0s      p(90)=0s      p(95)=0s     
     ✓ { mode:envelop-cache-jit }.......................: avg=0s      min=0s       med=0s     max=0s      p(90)=0s      p(95)=0s     
     ✓ { mode:envelop-just-cache }......................: avg=0s      min=0s       med=0s     max=0s      p(90)=0s      p(95)=0s     
     ✓ { mode:graphql-js }..............................: avg=0s      min=0s       med=0s     max=0s      p(90)=0s      p(95)=0s     
     graphql_validate...................................: avg=0s      min=0s       med=0s     max=0s      p(90)=0s      p(95)=0s     
     ✓ { mode:envelop-cache-jit }.......................: avg=0s      min=0s       med=0s     max=0s      p(90)=0s      p(95)=0s     
     ✓ { mode:envelop-just-cache }......................: avg=0s      min=0s       med=0s     max=0s      p(90)=0s      p(95)=0s     
     ✓ { mode:graphql-js }..............................: avg=0s      min=0s       med=0s     max=0s      p(90)=0s      p(95)=0s     
     http_req_blocked...................................: avg=1.97µs  min=731ns    med=1.76µs max=3.36ms  p(90)=2.45µs  p(95)=2.79µs 
     http_req_connecting................................: avg=22ns    min=0s       med=0s     max=1.36ms  p(90)=0s      p(95)=0s     
     http_req_duration..................................: avg=2.34ms  min=154.83µs med=2.05ms max=77.12ms p(90)=4.26ms  p(95)=4.79ms 
       { expected_response:true }.......................: avg=2.34ms  min=154.83µs med=2.05ms max=77.12ms p(90)=4.26ms  p(95)=4.79ms 
     ✓ { mode:envelop-cache-and-no-internal-tracing }...: avg=2.5ms   min=317.13µs med=2.21ms max=15.07ms p(90)=4.34ms  p(95)=4.73ms 
     ✓ { mode:envelop-cache-jit }.......................: avg=1.39ms  min=154.83µs med=1.08ms max=15.4ms  p(90)=2.21ms  p(95)=2.41ms 
     ✓ { mode:envelop-just-cache }......................: avg=2.49ms  min=267.87µs med=2.2ms  max=30.02ms p(90)=4.31ms  p(95)=4.72ms 
     ✓ { mode:graphql-js }..............................: avg=4.48ms  min=585.12µs med=3.78ms max=77.12ms p(90)=7.46ms  p(95)=8.24ms 
     http_req_failed....................................: 0.00%   ✓ 0           ✗ 456310
     http_req_receiving.................................: avg=32.22µs min=12.84µs  med=28.3µs max=10.78ms p(90)=43.24µs p(95)=48.19µs
     http_req_sending...................................: avg=12.39µs min=4.2µs    med=10.4µs max=7.39ms  p(90)=15.58µs p(95)=19.72µs
     http_req_tls_handshaking...........................: avg=0s      min=0s       med=0s     max=0s      p(90)=0s      p(95)=0s     
     http_req_waiting...................................: avg=2.29ms  min=122.03µs med=2.01ms max=77.05ms p(90)=4.21ms  p(95)=4.73ms 
     http_reqs..........................................: 456310  3802.549772/s
     iteration_duration.................................: avg=2.62ms  min=330.81µs med=2.32ms max=77.8ms  p(90)=4.52ms  p(95)=5.1ms  
     iterations.........................................: 456310  3802.549772/s
     vus................................................: 10      min=10        max=10  
     vus_max............................................: 20      min=20        max=20  

@EmrysMyrddin EmrysMyrddin merged commit de4d13b into main May 30, 2024
18 checks passed
@EmrysMyrddin EmrysMyrddin deleted the changeset-release/main branch May 30, 2024 09:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants