graphql/yoga-server/v2/migration/migration-from-express-graphql #1522
Replies: 1 comment 2 replies
-
Hello, I have questions for the migration of Previously, I have used the middlewares of express like this: import { GraphQLServer } from "graphql-yoga";
import helmet from "helmet";
import logger from "morgan";
const server = new GraphQLServe({
schema,
...
});
server.express.use(cors());
server.express.use(helmet()); But I couldn't find the migration guide for the legacy middlewards on const server = createServer({
schema,
context: (initialContext) => {
const req = initialContext.request;
req.isTest1 = isTest1()
req.isTest2 = isTest2()
return {
...initialContext,
req,
};
}
}); Could you please share any existing official guide? Thanks. |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
graphql/yoga-server/v2/migration/migration-from-express-graphql
Fully-featured, simple to set up, performant and extendable GraphQL NodeJS (JavaScript/TypeScript) server
https://www.the-guild.dev/graphql/yoga-server/v2/migration/migration-from-express-graphql
Beta Was this translation helpful? Give feedback.
All reactions