Skip to content

Commit

Permalink
bugFix: BaseConnection - fix edge.cursor mismatch. fix #32 (#139)
Browse files Browse the repository at this point in the history
  • Loading branch information
jugshaurya authored Jun 11, 2020
1 parent 5ebcc30 commit 5e230af
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
2 changes: 1 addition & 1 deletion api/config/db.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ module.exports = {
pool: { maxConnections: 5, maxIdleTime: 30 },
language: 'en',
alter: false,
logging: true,
logging: false,
define: {
underscored: true,
underscoredAll: true,
Expand Down
2 changes: 1 addition & 1 deletion api/graphql/base/ConnectionResolver.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ export default class BaseConnectionResolver extends BaseResolver {
return {
edges: results.map((node) => ({
node,
cursor: Buffer.from(JSON.stringify(node.id)).toString('base64'),
cursor: Buffer.from(JSON.stringify([node.id])).toString('base64'),
})),
pageInfo: {
startCursor: cursors.before,
Expand Down
7 changes: 6 additions & 1 deletion api/routes/graphql/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,14 @@ const server = new ApolloServer({
loaders: {
userAvailability: User.getAvailabilityLoader(),
eventInviteStatus: CalendarEventInvite.getStatusLoader(),
zoomAccountAvailability: ZoomAccount.getAvailabilityLoader()
zoomAccountAvailability: ZoomAccount.getAvailabilityLoader(),
},
}),
playground: {
settings: {
'request.credentials': 'include',
},
},
});

export const config = { api: { bodyParser: false } };
Expand Down

0 comments on commit 5e230af

Please sign in to comment.