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

fix: loosen default context type #1393

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

n1ru4l
Copy link
Owner

@n1ru4l n1ru4l commented May 12, 2022

No description provided.

@vercel
Copy link

vercel bot commented May 12, 2022

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated
envelop ✅ Ready (Inspect) Visit Preview May 12, 2022 at 7:18AM (UTC)

@changeset-bot
Copy link

changeset-bot bot commented May 12, 2022

🦋 Changeset detected

Latest commit: 672d023

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 30 packages
Name Type
@envelop/apollo-datasources Patch
@envelop/apollo-federation Patch
@envelop/apollo-server-errors Patch
@envelop/apollo-tracing Patch
@envelop/auth0 Patch
@envelop/core Patch
@envelop/dataloader Patch
@envelop/depth-limit Patch
@envelop/disable-introspection Patch
@envelop/execute-subscription-event Patch
@envelop/extended-validation Patch
@envelop/filter-operation-type Patch
@envelop/fragment-arguments Patch
@envelop/generic-auth Patch
@envelop/graphql-jit Patch
@envelop/graphql-middleware Patch
@envelop/graphql-modules Patch
@envelop/live-query Patch
@envelop/newrelic Patch
@envelop/opentelemetry Patch
@envelop/operation-field-permissions Patch
@envelop/parser-cache Patch
@envelop/persisted-operations Patch
@envelop/preload-assets Patch
@envelop/prometheus Patch
@envelop/rate-limiter Patch
@envelop/resource-limitations Patch
@envelop/response-cache Patch
@envelop/response-cache-redis Patch
@envelop/sentry Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@theguild-bot
Copy link
Collaborator

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

@@ -3,7 +3,7 @@ import { Plugin } from './plugin';
import { Spread, TuplifyUnion, Unarray } from './utils';

// We are using `interface` instead of `type` in order to allow type augmentation
export interface DefaultContext extends Record<string | symbol | number, unknown> {}
export interface DefaultContext {}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, this's much cleaner. an empty interface already allows any keys and values by default

@github-actions
Copy link
Contributor

github-actions bot commented Dec 16, 2022

🚀 Website Preview

The latest changes to the website are available as preview in: https://6655b5c1.envelop.pages.dev

@YassinEldeeb
Copy link
Collaborator

YassinEldeeb commented Dec 16, 2022

oh, that's weird. looks like the empty interface isn't behaving correctly. the CI fails with this error:

error TS2339: Property 'storeId' does not exist on type 'Readonly<DefaultContext>'.

which means it doesn't identify storeId as a key of the context object which is weird

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.

4 participants