-
Notifications
You must be signed in to change notification settings - Fork 177
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
chore(server): apollo server v3 -> v4 #2880
Conversation
ApolloServer, | ||
ForbiddenError, | ||
ApolloServerExpressConfig, | ||
ApolloError |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Apollo's ApolloError & ForbiddenError no longer exist
@@ -55,7 +55,7 @@ const cleanup = async () => { | |||
} | |||
|
|||
describe('Stream access requests', () => { | |||
let apollo: ApolloServer | |||
let apollo: ServerAndContext |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Biggest annoyance - Apollo Server instance is no longer associated w/ the context builder, its now fed into the express middleware instead. When running operations against it manually, the context value has to be passed into the execute() call
import { Nullable } from '@speckle/shared' | ||
import { UserInputError } from 'apollo-server-errors' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
UserInputError no longer exists
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some changes that conflict with the improvements to graphql errors I have in another PR. Let's merge this and I'll update the other PR to suit.
there were many breaking changes in this one, the most annoying one being that the context builder function is no longer associated with the ApolloServer instance
also had to update graphql 15 -> 16
i tested out server (& tests), frontend 2 and frontend, tried out both normal operations and subscriptions - all seemed to work