Comments (5)
Please share a reproduction on CodeSandbox or StackBlitz. Thanks!
from envelop.
Hello @ardatan I just finished to copy my config on StackBlitz and the error keep occuring: https://stackblitz.com/edit/node-g1tdag?file=index.ts
The /graphql route let you do a simple query and the /test route gives you access to the metrics the plugin collects.
Tell me if something is not clear. I am looking into the plugin source code to see if there is something missing.
from envelop.
contextFactory
is missing here. It is usually needed for the plugin's internals;
https://github.com/n1ru4l/envelop/blob/main/examples/express-graphql/index.ts#L28
const {
parse: customParseFn,
validate: customValidateFn,
execute: customExecuteFn,
schema: envelopedSchema,
+ contextFactory,
} = sentryEnvelop({
req: request,
res: response,
});
return {
schema: envelopedSchema,
rootValue: root,
+ context: await contextFactory(),
graphiql: true,
customParseFn,
customValidateFn,
customExecuteFn,
};
from envelop.
All right! When using only the contextFactory it works on my side but the thing is that I also have a custom context. I guess I can concatenate them but this does not seem to work. I am still investigating but at least I see that this contextFactory was the missing part.
from envelop.
You can pass your your context to getEnveloped
;
getEnveloped({ req, res, myStuff })
from envelop.
Related Issues (20)
- Improve types for `useErrorHandler` plugin
- Poor typings in `ExecutionArgs` in `@envelop/types` HOT 2
- [`@envelop/response-cache`] `ttl` yielded as `NaN`
- useMaskedErrors hides error's path HOT 5
- Arguments for the same field with an alias are being cached / ignored HOT 1
- [CloudflareKVPlugin]: Incompatible types when passing in argument for kv HOT 11
- Incorrect Handling of maxAge: 0 in @cacheControl Directive
- useErrorHandler does not handle errors from incremental results
- Cannot set properties of undefined (setting 'sentryEventId') HOT 2
- Allow setting a prefix in open telemetry spans
- useResponseCache: invalidate cache all at once
- useOnResolve: allow skipping default resolvers
- Prometheus plugin adds undefined label to histograms when label is excluded from config. HOT 1
- New API to always wrap execution phase HOT 1
- [useExtendedValidation] Passing context object to yoga breaks the server: "'getOwnPropertyDescriptor' on proxy: trap reported non-configurability for property (Cloudflare Workers) HOT 1
- [usePrometheus] Add resolver success and error metrics HOT 3
- [Sentry] SentryPluginOptions and Configuration descriptions
- [useResponseCache] Add the computed `scope` in `buildResponseCacheKey` function params HOT 8
- testkit addPlugin behavior does not match envelop's HOT 1
- Add Sentry v8 compatible integration HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from envelop.