Skip to content

Commit

Permalink
Merge branch 'release-2021-04-06'
Browse files Browse the repository at this point in the history
  • Loading branch information
Neo Technology Build Agent committed Apr 7, 2021
2 parents dd08c67 + ef05087 commit 164b085
Show file tree
Hide file tree
Showing 19 changed files with 140 additions and 64 deletions.
77 changes: 77 additions & 0 deletions .yarn/plugins/@yarnpkg/plugin-version.cjs

Large diffs are not rendered by default.

Empty file added .yarn/versions/2bb4d43e.yml
Empty file.
2 changes: 2 additions & 0 deletions .yarnrc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,7 @@ nodeLinker: node-modules
plugins:
- path: .yarn/plugins/@yarnpkg/plugin-workspace-tools.cjs
spec: "@yarnpkg/plugin-workspace-tools"
- path: .yarn/plugins/@yarnpkg/plugin-version.cjs
spec: "@yarnpkg/plugin-version"

yarnPath: .yarn/releases/yarn-berry.cjs
2 changes: 1 addition & 1 deletion examples/neo-push/server/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"license": "ISC",
"dependencies": {
"@neo4j/graphql": "1.0.0-alpha.6",
"@neo4j/graphql-ogm": "1.0.0-beta.1",
"@neo4j/graphql-ogm": "1.0.0-alpha.1",
"apollo-server-express": "2.19.0",
"bcrypt": "5.0.1",
"debug": "4.3.1",
Expand Down
2 changes: 1 addition & 1 deletion examples/neo-push/server/src/gql/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import * as Post from "./Post";
import * as Comment from "./Comment";
import * as config from "../config";

const typeDefs = [User.typeDefs, Blog.typeDefs, Post.typeDefs, Comment.typeDefs];
export const typeDefs = [User.typeDefs, Blog.typeDefs, Post.typeDefs, Comment.typeDefs];

const resolvers = {
...User.resolvers,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ describe("blog-auth", () => {
req.headers.authorization = `Bearer ${token}`;

try {
const apolloServer = await server({ req });
const apolloServer = server(driver, { req });

const response = await apolloServer.mutate({
mutation,
Expand Down Expand Up @@ -87,7 +87,7 @@ describe("blog-auth", () => {
CREATE (:Blog {id: "${blogId}"})
`);

const apolloServer = await server({ req });
const apolloServer = server(driver, { req });

const response = await apolloServer.mutate({
mutation,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ describe("blog-custom", () => {
isCreator
}
}
`;

const token = jsonwebtoken.sign({ sub: userId }, process.env.JWT_SECRET as string);
Expand All @@ -52,7 +52,7 @@ describe("blog-custom", () => {
CREATE (u:User {id: "${userId}"})-[:HAS_BLOG]->(:Blog {id: "${blogId}"})
`);

const apolloServer = await server({ req });
const apolloServer = server(driver, { req });

const response = await apolloServer.mutate({
mutation,
Expand Down Expand Up @@ -83,7 +83,7 @@ describe("blog-custom", () => {
isCreator
}
}
`;

const token = jsonwebtoken.sign({ sub: userId }, process.env.JWT_SECRET as string);
Expand All @@ -98,7 +98,7 @@ describe("blog-custom", () => {
CREATE (:Blog {id: "${blogId}"})
`);

const apolloServer = await server({ req });
const apolloServer = server(driver, { req });

const response = await apolloServer.mutate({
mutation,
Expand Down Expand Up @@ -131,7 +131,7 @@ describe("blog-custom", () => {
isAuthor
}
}
`;

const token = jsonwebtoken.sign({ sub: userId }, process.env.JWT_SECRET as string);
Expand All @@ -145,7 +145,7 @@ describe("blog-custom", () => {
CREATE (u:User {id: "${userId}"})-[:CAN_POST]->(:Blog {id: "${blogId}"})
`);

const apolloServer = await server({ req });
const apolloServer = server(driver, { req });

const response = await apolloServer.mutate({
mutation,
Expand Down Expand Up @@ -176,7 +176,7 @@ describe("blog-custom", () => {
isAuthor
}
}
`;

const token = jsonwebtoken.sign({ sub: userId }, process.env.JWT_SECRET as string);
Expand All @@ -191,7 +191,7 @@ describe("blog-custom", () => {
CREATE (:Blog {id: "${blogId}"})
`);

const apolloServer = await server({ req });
const apolloServer = server(driver, { req });

const response = await apolloServer.mutate({
mutation,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ describe("comment-auth", () => {
req.headers.authorization = `Bearer ${token}`;

try {
const apolloServer = await server({ req });
const apolloServer = server(driver, { req });

const response = await apolloServer.mutate({
mutation,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ describe("comment-custom", () => {
canDelete
}
}
`;

const token = jsonwebtoken.sign({ sub: userId }, process.env.JWT_SECRET as string);
Expand All @@ -62,7 +62,7 @@ describe("comment-custom", () => {
CREATE (p)-[:HAS_COMMENT]->(:Comment {id: "${commentId}"})<-[:COMMENTED]-(u)
`);

const apolloServer = await server({ req });
const apolloServer = server(driver, { req });

const response = await apolloServer.mutate({
mutation,
Expand Down Expand Up @@ -101,7 +101,7 @@ describe("comment-custom", () => {
canDelete
}
}
`;

const token = jsonwebtoken.sign({ sub: userId }, process.env.JWT_SECRET as string);
Expand All @@ -117,7 +117,7 @@ describe("comment-custom", () => {
CREATE (p)-[:HAS_COMMENT]->(:Comment {id: "${commentId}"})
`);

const apolloServer = await server({ req });
const apolloServer = server(driver, { req });

const response = await apolloServer.mutate({
mutation,
Expand Down Expand Up @@ -156,7 +156,7 @@ describe("comment-custom", () => {
canDelete
}
}
`;

const token = jsonwebtoken.sign({ sub: userId }, process.env.JWT_SECRET as string);
Expand All @@ -171,7 +171,7 @@ describe("comment-custom", () => {
CREATE (p)-[:HAS_COMMENT]->(:Comment {id: "${commentId}"})
`);

const apolloServer = await server({ req });
const apolloServer = server(driver, { req });

const response = await apolloServer.mutate({
mutation,
Expand Down Expand Up @@ -214,7 +214,7 @@ describe("comment-custom", () => {
canDelete
}
}
`;

const token = jsonwebtoken.sign({ sub: userId }, process.env.JWT_SECRET as string);
Expand All @@ -229,7 +229,7 @@ describe("comment-custom", () => {
CREATE (p)-[:HAS_COMMENT]->(:Comment {id: "${commentId}"})
`);

const apolloServer = await server({ req });
const apolloServer = server(driver, { req });

const response = await apolloServer.mutate({
mutation,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ describe("post-auth", () => {
req.headers.authorization = `Bearer ${token}`;

try {
const apolloServer = await server({ req });
const apolloServer = server(driver, { req });

const response = await apolloServer.mutate({
mutation,
Expand Down Expand Up @@ -90,7 +90,7 @@ describe("post-auth", () => {
CREATE (:Post {id: "${postId}"})
`);

const apolloServer = await server({ req });
const apolloServer = server(driver, { req });

const response = await apolloServer.mutate({
mutation,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ describe("post-custom", () => {
canEdit
}
}
`;

const token = jsonwebtoken.sign({ sub: userId }, process.env.JWT_SECRET as string);
Expand All @@ -58,7 +58,7 @@ describe("post-custom", () => {
-[:HAS_POST]->(:Post {id: "${postId}"})
`);

const apolloServer = await server({ req });
const apolloServer = server(driver, { req });

const response = await apolloServer.mutate({
mutation,
Expand Down Expand Up @@ -93,7 +93,7 @@ describe("post-custom", () => {
canEdit
}
}
`;

const token = jsonwebtoken.sign({ sub: userId }, process.env.JWT_SECRET as string);
Expand All @@ -109,7 +109,7 @@ describe("post-custom", () => {
-[:HAS_POST]->(:Post {id: "${postId}"})
`);

const apolloServer = await server({ req });
const apolloServer = server(driver, { req });

const response = await apolloServer.mutate({
mutation,
Expand Down Expand Up @@ -144,7 +144,7 @@ describe("post-custom", () => {
canEdit
}
}
`;

const token = jsonwebtoken.sign({ sub: userId }, process.env.JWT_SECRET as string);
Expand All @@ -159,7 +159,7 @@ describe("post-custom", () => {
(:Post {id: "${postId}"})<-[:HAS_POST]-(:Blog {id: "${blogId}"})
`);

const apolloServer = await server({ req });
const apolloServer = server(driver, { req });

const response = await apolloServer.mutate({
mutation,
Expand Down Expand Up @@ -198,7 +198,7 @@ describe("post-custom", () => {
canEdit
}
}
`;

const token = jsonwebtoken.sign({ sub: userId }, process.env.JWT_SECRET as string);
Expand All @@ -214,7 +214,7 @@ describe("post-custom", () => {
-[:HAS_POST]->(:Post {id: "${postId}"})
`);

const apolloServer = await server({ req });
const apolloServer = server(driver, { req });

const response = await apolloServer.mutate({
mutation,
Expand Down Expand Up @@ -251,7 +251,7 @@ describe("post-custom", () => {
canDelete
}
}
`;

const token = jsonwebtoken.sign({ sub: userId }, process.env.JWT_SECRET as string);
Expand All @@ -267,7 +267,7 @@ describe("post-custom", () => {
-[:HAS_POST]->(:Post {id: "${postId}"})
`);

const apolloServer = await server({ req });
const apolloServer = server(driver, { req });

const response = await apolloServer.mutate({
mutation,
Expand Down Expand Up @@ -302,7 +302,7 @@ describe("post-custom", () => {
canDelete
}
}
`;

const token = jsonwebtoken.sign({ sub: userId }, process.env.JWT_SECRET as string);
Expand All @@ -318,7 +318,7 @@ describe("post-custom", () => {
<-[:HAS_POST]-(:Blog {id: "${blogId}"})
`);

const apolloServer = await server({ req });
const apolloServer = server(driver, { req });

const response = await apolloServer.mutate({
mutation,
Expand Down Expand Up @@ -357,7 +357,7 @@ describe("post-custom", () => {
canDelete
}
}
`;

const token = jsonwebtoken.sign({ sub: userId }, process.env.JWT_SECRET as string);
Expand All @@ -373,7 +373,7 @@ describe("post-custom", () => {
-[:HAS_POST]->(:Post {id: "${postId}"})
`);

const apolloServer = await server({ req });
const apolloServer = server(driver, { req });

const response = await apolloServer.mutate({
mutation,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ describe("signIn", () => {
});

test("should throw user not found", async () => {
const apolloServer = await server();
const apolloServer = server(driver);

const mutation = `
mutation signIn($email: String! $password: String!){
Expand Down Expand Up @@ -46,7 +46,7 @@ describe("signIn", () => {
});

test("should throw Unauthorized on invalid password", async () => {
const apolloServer = await server();
const apolloServer = server(driver);
const session = driver.session();

const mutation = `
Expand Down Expand Up @@ -90,7 +90,7 @@ describe("signIn", () => {
});

test("should sign user in and return JWT", async () => {
const apolloServer = await server();
const apolloServer = server(driver);
const session = driver.session();

const mutation = `
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ describe("signUp", () => {
});

test("should throw user with that email already exists", async () => {
const apolloServer = await server();
const apolloServer = server(driver);
const session = driver.session();

const mutation = `
Expand Down Expand Up @@ -62,7 +62,7 @@ describe("signUp", () => {
});

test("should create user and return JWT", async () => {
const apolloServer = await server();
const apolloServer = server(driver);
const session = driver.session();

const mutation = `
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ describe("user-auth", () => {
CREATE (:User {id: "${anotherUserId}"})
`);

const apolloServer = await server({ req });
const apolloServer = server(driver, { req });

const response = await apolloServer.mutate({
mutation,
Expand Down
Loading

0 comments on commit 164b085

Please sign in to comment.