Skip to content

Commit 63aba53

Browse files
authored
Update some of the dependencies (#30)
1 parent c0e5bd8 commit 63aba53

File tree

7 files changed

+3752
-2939
lines changed

7 files changed

+3752
-2939
lines changed

__tests__/__snapshots__/hasRole.test.ts.snap

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,20 @@
11
// Jest Snapshot v1, https://goo.gl/fbAQLP
22

33
exports[`getDirectiveDeclaration should be defined 1`] = `
4-
GraphQLDirective {
5-
"args": Array [
6-
Object {
4+
Object {
5+
"args": Object {
6+
"role": Object {
77
"astNode": undefined,
88
"defaultValue": undefined,
9-
"description": null,
10-
"name": "role",
9+
"description": undefined,
10+
"extensions": undefined,
1111
"type": "String",
1212
},
13-
],
13+
},
1414
"astNode": undefined,
1515
"description": undefined,
16+
"extensions": undefined,
17+
"isRepeatable": false,
1618
"locations": Array [
1719
"FIELD_DEFINITION",
1820
],

__tests__/__snapshots__/isAuthenticated.test.ts.snap

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
11
// Jest Snapshot v1, https://goo.gl/fbAQLP
22

33
exports[`getDirectiveDeclaration should be defined 1`] = `
4-
GraphQLDirective {
5-
"args": Array [],
4+
Object {
5+
"args": Object {},
66
"astNode": undefined,
77
"description": undefined,
8+
"extensions": undefined,
9+
"isRepeatable": false,
810
"locations": Array [
911
"FIELD_DEFINITION",
1012
],

__tests__/hasRole.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ beforeAll(() => {
88
});
99

1010
test('getDirectiveDeclaration should be defined', () => {
11-
expect(AuthDirective().hasRole.getDirectiveDeclaration()).toMatchSnapshot();
11+
expect(AuthDirective().hasRole.getDirectiveDeclaration().toConfig()).toMatchSnapshot();
1212
});
1313

1414
test('if throw error if no role inside token payload', () =>

__tests__/isAuthenticated.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ beforeAll(() => {
99

1010
test('getDirectiveDeclaration should be defined', () => {
1111
expect(
12-
AuthDirective().isAuthenticated.getDirectiveDeclaration()
12+
AuthDirective().isAuthenticated.getDirectiveDeclaration().toConfig()
1313
).toMatchSnapshot();
1414
});
1515

example/schema.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@ import { AuthDirective } from '../src/index';
33
import { makeExecutableSchema } from 'graphql-tools';
44

55
const typeDefs = gql`
6+
directive @isAuthenticated on FIELD_DEFINITION
7+
directive @hasRole(role: String) on FIELD_DEFINITION
8+
69
type User {
710
id: ID!
811
username: String!

package.json

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -36,20 +36,19 @@
3636
"@babel/preset-env": "^7.1.0",
3737
"@babel/preset-typescript": "^7.1.0",
3838
"@babel/register": "^7.0.0",
39-
"@types/graphql": "^14.0.3",
4039
"@types/jsonwebtoken": "^7.2.8",
4140
"apollo-server-express": "^2.0.0",
4241
"body-parser": "^1.18.3",
4342
"eslint": "^5.2.0",
4443
"eslint-config-callstack-io": "^1.1.2",
4544
"express": "^4.16.4",
46-
"graphql": "^0.13.2",
47-
"graphql-tools": "^3.0.5",
48-
"jest": "^23.6.0",
45+
"graphql": "^15.0.0",
46+
"graphql-tools": "^5.0.0",
47+
"jest": "^25.4.0",
4948
"mock-express-request": "^0.2.2",
5049
"nock": "^10.0.2",
5150
"nodemon": "^1.18.7",
52-
"ts-jest": "^23.10.4",
51+
"ts-jest": "^25.4.0",
5352
"typescript": "^3.1.6"
5453
},
5554
"dependencies": {

0 commit comments

Comments
 (0)