Skip to content

Migrate to Apollo v5#119

Open
pawiecz wants to merge 7 commits intomainfrom
migrate-to-apollo-v5
Open

Migrate to Apollo v5#119
pawiecz wants to merge 7 commits intomainfrom
migrate-to-apollo-v5

Conversation

@pawiecz
Copy link
Copy Markdown
Contributor

@pawiecz pawiecz commented Mar 17, 2026

Context & Requests for Reviewers

Fixes: #67

Tests

  • Server tests passed locally
  • Generated GraphQL contains no changes
  • Server and Client are operational in local environment

Base automatically changed from migrate-to-vite to main March 24, 2026 02:32
@pawiecz
Copy link
Copy Markdown
Contributor Author

pawiecz commented Mar 24, 2026

This PR suffers from the same issue as #74 (missing Vite configuration in Docker build context).

I'll rebase it on current main and undraft it.

@pawiecz pawiecz force-pushed the migrate-to-apollo-v5 branch from 739d331 to 27505f4 Compare March 31, 2026 14:56
@pawiecz pawiecz marked this pull request as ready for review March 31, 2026 15:01
Copy link
Copy Markdown
Contributor

@vinaysrao1 vinaysrao1 left a comment

Choose a reason for hiding this comment

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

Minor requests only. this is a clean and methodically done PR. Well done.

);

Object.entries(controllers).forEach(([_k, controller]) => {
controller.routes.forEach((it) => {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Nit, indentation

"@googlemaps/google-maps-services-js@^3.3.16": {
"retry-axios": "npm:@ethanresnick/retry-axios@2.6.1"
},
"apollo-server-express": {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Is this needed

message: sanitizedErrorTitle,
extensions,
};
} as unknown as GraphQLFormattedError;
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

do we need double casting here?

const user = context.getUser();
if (!user || !user.orgId) {
throw new AuthenticationError('User must be authenticated');
throw new GraphQLError('User must be authenticated', { extensions: { code: 'UNAUTHENTICATED' } });
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

These should be FORBIDDEN instead

const user = context.getUser();
if (!user || !user.orgId) {
throw new AuthenticationError('User must be authenticated');
throw new GraphQLError('User must be authenticated', { extensions: { code: 'UNAUTHENTICATED' } });
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

maybe we should move all these to helper functions similar to what we had. where we just pass the message.

function unauthenticatedError(msg: string) {
  return new GraphQLError(msg, { extensions: { code: 'UNAUTHENTICATED' } });
}

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.

Migrate apollo-* server dependencies that reached EOL

3 participants