From a762fc3d48d01c377df730f930ca01c62d425e9b Mon Sep 17 00:00:00 2001 From: Darrell Warde Date: Wed, 21 Apr 2021 12:35:12 +0100 Subject: [PATCH 1/5] Remove dependency on @graphql-tools/utils to hopefully avoid type issues, and generally loosen dependency version requirements a little. @neo4j/graphql* libraries have version ">1.0.0-beta <1.0.0" for now, to prevent mixed usage of beta/stable. This can be simplified when we release 1.0.0. --- examples/neo-push/server/package.json | 4 +- packages/graphql/package.json | 24 +- packages/graphql/src/classes/Neo4jGraphQL.ts | 5 +- .../src/schema/make-augmented-schema.ts | 7 +- .../src/schema/wrap-custom-resolvers.ts | 4 +- packages/ogm/package.json | 10 +- yarn.lock | 205 ++++++++---------- 7 files changed, 118 insertions(+), 141 deletions(-) diff --git a/examples/neo-push/server/package.json b/examples/neo-push/server/package.json index 403d194be0..70ef7cd452 100644 --- a/examples/neo-push/server/package.json +++ b/examples/neo-push/server/package.json @@ -12,8 +12,8 @@ "author": "", "license": "ISC", "dependencies": { - "@neo4j/graphql": "1.0.0-alpha.6", - "@neo4j/graphql-ogm": "1.0.0-alpha.1", + "@neo4j/graphql": ">1.0.0-beta <1.0.0", + "@neo4j/graphql-ogm": ">1.0.0-beta <1.0.0", "apollo-server-express": "2.19.0", "bcrypt": "5.0.1", "debug": "4.3.1", diff --git a/packages/graphql/package.json b/packages/graphql/package.json index 204498dcb8..ee728375f5 100644 --- a/packages/graphql/package.json +++ b/packages/graphql/package.json @@ -40,10 +40,10 @@ "author": "Neo4j Inc.", "peerDependencies": { "graphql": "^15.0.0", - "neo4j-driver": "^4.2.0" + "neo4j-driver": "^4.1.0" }, "devDependencies": { - "@graphql-tools/utils": "7.1.4", + "@graphql-tools/utils": "^7.7.3", "@types/deep-equal": "1.0.1", "@types/faker": "5.1.7", "@types/is-uuid": "1.0.0", @@ -59,7 +59,6 @@ "is-uuid": "1.0.2", "jest": "26.2.2", "libnpmsearch": "3.1.0", - "neo4j-driver": "4.2.0", "npm-run-all": "4.1.5", "randomstring": "1.1.5", "rimraf": "3.0.2", @@ -68,16 +67,15 @@ "typescript": "3.9.7" }, "dependencies": { - "@graphql-tools/merge": "^6.2.3", - "@graphql-tools/schema": "^6.2.3", - "@graphql-tools/utils": "7.6.0", - "camelcase": "6.2.0", - "deep-equal": "2.0.5", - "dot-prop": "6.0.1", - "graphql-compose": "7.21.4", - "graphql-parse-resolve-info": "4.9.0", - "jsonwebtoken": "8.5.1", - "pluralize": "8.0.0", + "@graphql-tools/merge": "^6.2.13", + "@graphql-tools/schema": "^7.1.3", + "camelcase": "^6.2.0", + "deep-equal": "^2.0.5", + "dot-prop": "^6.0.1", + "graphql-compose": "^7.25.1", + "graphql-parse-resolve-info": "^4.11.0", + "jsonwebtoken": "^8.5.1", + "pluralize": "^8.0.0", "upper-case-first": "^2.0.2" } } diff --git a/packages/graphql/src/classes/Neo4jGraphQL.ts b/packages/graphql/src/classes/Neo4jGraphQL.ts index a6b6c69085..a0ac99cd12 100644 --- a/packages/graphql/src/classes/Neo4jGraphQL.ts +++ b/packages/graphql/src/classes/Neo4jGraphQL.ts @@ -19,7 +19,6 @@ import { Driver } from "neo4j-driver"; import { DocumentNode, GraphQLSchema, parse, printSchema } from "graphql"; -import { ITypeDefinitions, IResolvers } from "@graphql-tools/utils"; import { addSchemaLevelResolver, IExecutableSchemaDefinition } from "@graphql-tools/schema"; import { parseResolveInfo, ResolveTree } from "graphql-parse-resolve-info"; import type { DriverConfig } from "../types"; @@ -28,7 +27,9 @@ import Node from "./Node"; import { checkNeo4jCompat } from "../utils"; import { getJWT } from "../auth/index"; -export type SchemaDirectives = IExecutableSchemaDefinition["schemaDirectives"]; +type IResolvers = IExecutableSchemaDefinition["resolvers"]; +type ITypeDefinitions = IExecutableSchemaDefinition["typeDefs"]; +type SchemaDirectives = IExecutableSchemaDefinition["schemaDirectives"]; export interface Neo4jGraphQLConstructor { typeDefs: ITypeDefinitions; diff --git a/packages/graphql/src/schema/make-augmented-schema.ts b/packages/graphql/src/schema/make-augmented-schema.ts index 92a579370c..926f5724cf 100644 --- a/packages/graphql/src/schema/make-augmented-schema.ts +++ b/packages/graphql/src/schema/make-augmented-schema.ts @@ -19,7 +19,6 @@ import { mergeTypeDefs } from "@graphql-tools/merge"; import { IExecutableSchemaDefinition, makeExecutableSchema } from "@graphql-tools/schema"; -import { ITypeDefinitions, IResolvers } from "@graphql-tools/utils"; import camelCase from "camelcase"; import { DefinitionNode, @@ -57,6 +56,8 @@ import { graphqlDirectivesToCompose, objectFieldsToComposeFields } from "./to-co import validateTypeDefs from "./validation"; import environment from "../environment"; +type IResolvers = IExecutableSchemaDefinition["resolvers"]; +type ITypeDefinitions = IExecutableSchemaDefinition["typeDefs"]; type SchemaDirectives = IExecutableSchemaDefinition["schemaDirectives"]; function makeAugmentedSchema({ @@ -735,6 +736,10 @@ function makeAugmentedSchema({ composer.createInputTC(point.cartesianPointDistance); } + if (!Object.values(composer.Mutation.getFields()).length) { + composer.delete("Mutation"); + } + const generatedTypeDefs = composer.toSDL(); let generatedResolvers: any = { ...composer.getResolveMethods(), diff --git a/packages/graphql/src/schema/wrap-custom-resolvers.ts b/packages/graphql/src/schema/wrap-custom-resolvers.ts index 1287307f17..764f52807a 100644 --- a/packages/graphql/src/schema/wrap-custom-resolvers.ts +++ b/packages/graphql/src/schema/wrap-custom-resolvers.ts @@ -17,9 +17,11 @@ * limitations under the License. */ -import { IResolvers } from "@graphql-tools/utils"; +import { IExecutableSchemaDefinition } from "@graphql-tools/schema"; import createAuthParam from "../translate/create-auth-param"; +type IResolvers = IExecutableSchemaDefinition["resolvers"]; + function wrapCustomResolvers({ resolvers, generatedResolvers, diff --git a/packages/ogm/package.json b/packages/ogm/package.json index e26d9cbb6f..24e674db53 100644 --- a/packages/ogm/package.json +++ b/packages/ogm/package.json @@ -31,15 +31,15 @@ }, "author": "Neo4j Inc.", "dependencies": { - "@graphql-tools/merge": "6.2.10", - "@neo4j/graphql": "1.0.0-beta.2", - "camelcase": "6.2.0", - "pluralize": "8.0.0", + "@graphql-tools/merge": "^6.2.13", + "@neo4j/graphql": ">1.0.0-beta <1.0.0", + "camelcase": "^6.2.0", + "pluralize": "^8.0.0", "upper-case-first": "^2.0.2" }, "peerDependencies": { "graphql": "^15.0.0", - "neo4j-driver": "^4.2.0" + "neo4j-driver": "^4.1.0" }, "devDependencies": { "@types/jest": "26.0.8", diff --git a/yarn.lock b/yarn.lock index 11389701f9..45844cfba3 100644 --- a/yarn.lock +++ b/yarn.lock @@ -602,32 +602,20 @@ __metadata: languageName: node linkType: hard -"@graphql-tools/merge@npm:6.2.10, @graphql-tools/merge@npm:^6.2.3": - version: 6.2.10 - resolution: "@graphql-tools/merge@npm:6.2.10" +"@graphql-tools/merge@npm:^6.2.13": + version: 6.2.13 + resolution: "@graphql-tools/merge@npm:6.2.13" dependencies: "@graphql-tools/schema": ^7.0.0 - "@graphql-tools/utils": ^7.5.0 - tslib: ~2.1.0 - peerDependencies: - graphql: ^14.0.0 || ^15.0.0 - checksum: b9b4bac1b18ede71ae06fd8669b59d8af327a9843d0b2510d79cdd3777ac53f88f6a3db75d9416995d76ce76d3afca72ce4ad9ebf4fb127f745cbc7ee7b8841e - languageName: node - linkType: hard - -"@graphql-tools/schema@npm:^6.2.3": - version: 6.2.4 - resolution: "@graphql-tools/schema@npm:6.2.4" - dependencies: - "@graphql-tools/utils": ^6.2.4 - tslib: ~2.0.1 + "@graphql-tools/utils": ^7.7.0 + tslib: ~2.2.0 peerDependencies: graphql: ^14.0.0 || ^15.0.0 - checksum: 030f1a7489873d0541119d93f1cbe17cdba2bd7619f4bcb254df123db024e5e481da862d8e31dc3e58d78f4a1193950cc7e9f2419dbcac6bcb130580d44532f6 + checksum: 19c977ebd6f918ec9ccdeb9cfd7cd4e818767c9f7fd19bd3d7d17888d9f98a977e63a9c111b254eb14ac420453fec84d2b336cc4d7a6a3c8a2e61f25af2f6b85 languageName: node linkType: hard -"@graphql-tools/schema@npm:^7.0.0": +"@graphql-tools/schema@npm:^7.0.0, @graphql-tools/schema@npm:^7.1.3": version: 7.1.3 resolution: "@graphql-tools/schema@npm:7.1.3" dependencies: @@ -639,42 +627,29 @@ __metadata: languageName: node linkType: hard -"@graphql-tools/utils@npm:7.1.4": - version: 7.1.4 - resolution: "@graphql-tools/utils@npm:7.1.4" +"@graphql-tools/utils@npm:^7.1.2": + version: 7.6.0 + resolution: "@graphql-tools/utils@npm:7.6.0" dependencies: "@ardatan/aggregate-error": 0.0.6 camel-case: 4.1.2 - tslib: ~2.0.1 - peerDependencies: - graphql: ^14.0.0 || ^15.0.0 - checksum: 1d91f8d4ba491dfc42e1dd67d6c38e7607caf790e8e4d5abcfdad5737acca72c89375ee6040942452c9951943b61a08240046622e5b038abfa5ab0bb42dbaf4b - languageName: node - linkType: hard - -"@graphql-tools/utils@npm:^6.2.4": - version: 6.2.4 - resolution: "@graphql-tools/utils@npm:6.2.4" - dependencies: - "@ardatan/aggregate-error": 0.0.6 - camel-case: 4.1.1 - tslib: ~2.0.1 + tslib: ~2.1.0 peerDependencies: graphql: ^14.0.0 || ^15.0.0 - checksum: d773b36540ac9c997945f09dce5bfd7eab22256a0e3279cfc6b861dfb437d6eda70f572d6bea532677acbb7fadead301978d92d205030f85189b72dc356934a1 + checksum: 9fc3ca2fba490119cd9ea4b9daafed0712e906f246a3f394ce13159b703e0e82236916f5d31fc1c42eb66f4286e7cfe342b7d246c36a835d00019e726585ed6f languageName: node linkType: hard -"@graphql-tools/utils@npm:^7.1.2, @graphql-tools/utils@npm:^7.5.0": - version: 7.6.0 - resolution: "@graphql-tools/utils@npm:7.6.0" +"@graphql-tools/utils@npm:^7.7.0, @graphql-tools/utils@npm:^7.7.3": + version: 7.7.3 + resolution: "@graphql-tools/utils@npm:7.7.3" dependencies: "@ardatan/aggregate-error": 0.0.6 camel-case: 4.1.2 - tslib: ~2.1.0 + tslib: ~2.2.0 peerDependencies: graphql: ^14.0.0 || ^15.0.0 - checksum: 9fc3ca2fba490119cd9ea4b9daafed0712e906f246a3f394ce13159b703e0e82236916f5d31fc1c42eb66f4286e7cfe342b7d246c36a835d00019e726585ed6f + checksum: 08a04cf47375316cbd391ff81daa6350431550afe3a4ea7fe93263d76e18e8a086fddb43a1034af6f29a6840f18caa87e2a153d01260a9e9a6b75d2dbc8fe0fb languageName: node linkType: hard @@ -933,20 +908,20 @@ __metadata: languageName: node linkType: hard -"@neo4j/graphql-ogm@1.0.0-alpha.1, @neo4j/graphql-ogm@workspace:packages/ogm": +"@neo4j/graphql-ogm@>1.0.0-beta <1.0.0, @neo4j/graphql-ogm@workspace:packages/ogm": version: 0.0.0-use.local resolution: "@neo4j/graphql-ogm@workspace:packages/ogm" dependencies: - "@graphql-tools/merge": 6.2.10 - "@neo4j/graphql": 1.0.0-alpha.6 + "@graphql-tools/merge": ^6.2.13 + "@neo4j/graphql": ">1.0.0-beta <1.0.0" "@types/jest": 26.0.8 "@types/node": 14.0.27 - camelcase: 6.2.0 + camelcase: ^6.2.0 graphql-tag: 2.11.0 jest: 26.2.2 libnpmsearch: 3.1.0 npm-run-all: ^4.1.5 - pluralize: 8.0.0 + pluralize: ^8.0.0 randomstring: 1.1.5 semver: 7.3.5 ts-jest: 26.1.4 @@ -954,17 +929,17 @@ __metadata: upper-case-first: ^2.0.2 peerDependencies: graphql: ^15.0.0 - neo4j-driver: ^4.2.0 + neo4j-driver: ^4.1.0 languageName: unknown linkType: soft -"@neo4j/graphql@1.0.0-alpha.6, @neo4j/graphql@workspace:packages/graphql": +"@neo4j/graphql@>1.0.0-beta <1.0.0, @neo4j/graphql@workspace:packages/graphql": version: 0.0.0-use.local resolution: "@neo4j/graphql@workspace:packages/graphql" dependencies: - "@graphql-tools/merge": ^6.2.3 - "@graphql-tools/schema": ^6.2.3 - "@graphql-tools/utils": 7.1.4 + "@graphql-tools/merge": ^6.2.13 + "@graphql-tools/schema": ^7.1.3 + "@graphql-tools/utils": ^7.7.3 "@types/deep-equal": 1.0.1 "@types/faker": 5.1.7 "@types/is-uuid": 1.0.0 @@ -974,21 +949,20 @@ __metadata: "@types/pluralize": 0.0.29 "@types/randomstring": 1.1.6 apollo-server: 2.21.0 - camelcase: 6.2.0 - deep-equal: 2.0.5 - dot-prop: 6.0.1 + camelcase: ^6.2.0 + deep-equal: ^2.0.5 + dot-prop: ^6.0.1 faker: 5.2.0 graphql: 15.3.0 - graphql-compose: 7.21.4 - graphql-parse-resolve-info: 4.9.0 + graphql-compose: ^7.25.1 + graphql-parse-resolve-info: ^4.11.0 graphql-tag: 2.11.0 is-uuid: 1.0.2 jest: 26.2.2 - jsonwebtoken: 8.5.1 + jsonwebtoken: ^8.5.1 libnpmsearch: 3.1.0 - neo4j-driver: 4.2.0 npm-run-all: 4.1.5 - pluralize: 8.0.0 + pluralize: ^8.0.0 randomstring: 1.1.5 rimraf: 3.0.2 semver: 7.3.5 @@ -997,7 +971,7 @@ __metadata: upper-case-first: ^2.0.2 peerDependencies: graphql: ^15.0.0 - neo4j-driver: ^4.2.0 + neo4j-driver: ^4.1.0 languageName: unknown linkType: soft @@ -3827,16 +3801,6 @@ __metadata: languageName: node linkType: hard -"camel-case@npm:4.1.1": - version: 4.1.1 - resolution: "camel-case@npm:4.1.1" - dependencies: - pascal-case: ^3.1.1 - tslib: ^1.10.0 - checksum: c202f62a74c020e51ab6d7d02c0367a6b8cd5d1803e69371421970186d6ca32a20437eb45257baa00a7bb976a202e8fbdb75d509145f5b022f7f80936997c6b8 - languageName: node - linkType: hard - "camel-case@npm:4.1.2, camel-case@npm:^4.1.1": version: 4.1.2 resolution: "camel-case@npm:4.1.2" @@ -3847,13 +3811,6 @@ __metadata: languageName: node linkType: hard -"camelcase@npm:6.2.0, camelcase@npm:^6.0.0, camelcase@npm:^6.2.0": - version: 6.2.0 - resolution: "camelcase@npm:6.2.0" - checksum: 654700600a80cb1f06ab85b3e2fe80333f94b441884d40826becdac549774f51b0317c6dcb6040416df26241fa9481eb58d0c1659d4d6d5627dcd4259be61beb - languageName: node - linkType: hard - "camelcase@npm:^5.0.0, camelcase@npm:^5.3.1": version: 5.3.1 resolution: "camelcase@npm:5.3.1" @@ -3861,6 +3818,13 @@ __metadata: languageName: node linkType: hard +"camelcase@npm:^6.0.0, camelcase@npm:^6.2.0": + version: 6.2.0 + resolution: "camelcase@npm:6.2.0" + checksum: 654700600a80cb1f06ab85b3e2fe80333f94b441884d40826becdac549774f51b0317c6dcb6040416df26241fa9481eb58d0c1659d4d6d5627dcd4259be61beb + languageName: node + linkType: hard + "caniuse-lite@npm:^1.0.30001181": version: 1.0.30001204 resolution: "caniuse-lite@npm:1.0.30001204" @@ -4682,7 +4646,21 @@ __metadata: languageName: node linkType: hard -"deep-equal@npm:2.0.5": +"deep-equal@npm:^1.0.1": + version: 1.1.1 + resolution: "deep-equal@npm:1.1.1" + dependencies: + is-arguments: ^1.0.4 + is-date-object: ^1.0.1 + is-regex: ^1.0.4 + object-is: ^1.0.1 + object-keys: ^1.1.1 + regexp.prototype.flags: ^1.2.0 + checksum: cc6a0009ce73a10230758d50795211fb3ceb7eb7f2cf8baed1c4a4cb2a06dc28857ce11e641c95ca9abb5edc1f1e86a4bb6bcffaadf9fe9d310c102d346d043b + languageName: node + linkType: hard + +"deep-equal@npm:^2.0.5": version: 2.0.5 resolution: "deep-equal@npm:2.0.5" dependencies: @@ -4705,20 +4683,6 @@ __metadata: languageName: node linkType: hard -"deep-equal@npm:^1.0.1": - version: 1.1.1 - resolution: "deep-equal@npm:1.1.1" - dependencies: - is-arguments: ^1.0.4 - is-date-object: ^1.0.1 - is-regex: ^1.0.4 - object-is: ^1.0.1 - object-keys: ^1.1.1 - regexp.prototype.flags: ^1.2.0 - checksum: cc6a0009ce73a10230758d50795211fb3ceb7eb7f2cf8baed1c4a4cb2a06dc28857ce11e641c95ca9abb5edc1f1e86a4bb6bcffaadf9fe9d310c102d346d043b - languageName: node - linkType: hard - "deep-extend@npm:^0.6.0": version: 0.6.0 resolution: "deep-extend@npm:0.6.0" @@ -5081,21 +5045,21 @@ __metadata: languageName: node linkType: hard -"dot-prop@npm:6.0.1": - version: 6.0.1 - resolution: "dot-prop@npm:6.0.1" +"dot-prop@npm:^5.2.0": + version: 5.3.0 + resolution: "dot-prop@npm:5.3.0" dependencies: is-obj: ^2.0.0 - checksum: 06793b868079d70bffce4f0ac7e32055778723cc90b6e0bb12a2dff157298e693fb9ac7733556e4bb2d54de9d670a0b6a67610295cb1119a204fb7e340fafe54 + checksum: 76e6693d8803eeff9cb920988446bf223cf1f6e5b1c0c2fe07a66906392134931a481b11e3c0bd852c5cfc97fad65258bcb4359169ad1d8d624cb3f56932be98 languageName: node linkType: hard -"dot-prop@npm:^5.2.0": - version: 5.3.0 - resolution: "dot-prop@npm:5.3.0" +"dot-prop@npm:^6.0.1": + version: 6.0.1 + resolution: "dot-prop@npm:6.0.1" dependencies: is-obj: ^2.0.0 - checksum: 76e6693d8803eeff9cb920988446bf223cf1f6e5b1c0c2fe07a66906392134931a481b11e3c0bd852c5cfc97fad65258bcb4359169ad1d8d624cb3f56932be98 + checksum: 06793b868079d70bffce4f0ac7e32055778723cc90b6e0bb12a2dff157298e693fb9ac7733556e4bb2d54de9d670a0b6a67610295cb1119a204fb7e340fafe54 languageName: node linkType: hard @@ -6593,15 +6557,15 @@ fsevents@^1.2.7: languageName: node linkType: hard -"graphql-compose@npm:7.21.4": - version: 7.21.4 - resolution: "graphql-compose@npm:7.21.4" +"graphql-compose@npm:^7.25.1": + version: 7.25.1 + resolution: "graphql-compose@npm:7.25.1" dependencies: graphql-type-json: 0.3.2 - object-path: ^0.11.4 + object-path: 0.11.5 peerDependencies: graphql: ^14.2.0 || ^15.0.0 - checksum: fce6ffd4a19e4da8589a5b2b5d52c0f0a13c448551a14793bbd48e4d89e352ca565bd760f14dca10a5f79c742557f59bf591b1d004d0922a1d83be886f8fff46 + checksum: 96aa8a6ab9f2c3b2c97747bb2706aeaa4a88d90c10246d0d40caf8936aeea04e61267fb60db2651e59a6665e58a4a52c911259297c005a63900095dd3881e44f languageName: node linkType: hard @@ -6618,15 +6582,15 @@ fsevents@^1.2.7: languageName: node linkType: hard -"graphql-parse-resolve-info@npm:4.9.0": - version: 4.9.0 - resolution: "graphql-parse-resolve-info@npm:4.9.0" +"graphql-parse-resolve-info@npm:^4.11.0": + version: 4.11.0 + resolution: "graphql-parse-resolve-info@npm:4.11.0" dependencies: debug: ^4.1.1 tslib: ^2.0.1 peerDependencies: - graphql: ">=0.9 <0.14 || ^14.0.2" - checksum: 4005a0818aa27ff91ac404f3d1207333bf2ad13888ac741ca72fd6bc128dc134677ac30a1ff56da605c50f7ae8ebf0e5f3e4e2ce8e481d65c1be4d7f7927ebd3 + graphql: ">=0.9 <0.14 || ^14.0.2 || ^15.4.0" + checksum: ef41c34e647abbfeb720398012c559c4d3e4d3f78f6e5e994e55940bcfa5c48ad65274609bc22f1e8837c7b1027a897ef9c2334ec2152d3b52f1ba9f22dbc817 languageName: node linkType: hard @@ -8646,7 +8610,7 @@ fsevents@^1.2.7: languageName: node linkType: hard -"jsonwebtoken@npm:8.5.1": +"jsonwebtoken@npm:8.5.1, jsonwebtoken@npm:^8.5.1": version: 8.5.1 resolution: "jsonwebtoken@npm:8.5.1" dependencies: @@ -9667,8 +9631,8 @@ fsevents@^1.2.7: version: 0.0.0-use.local resolution: "neo-push-server@workspace:examples/neo-push/server" dependencies: - "@neo4j/graphql": 1.0.0-alpha.6 - "@neo4j/graphql-ogm": 1.0.0-alpha.1 + "@neo4j/graphql": ">1.0.0-beta <1.0.0" + "@neo4j/graphql-ogm": ">1.0.0-beta <1.0.0" "@types/bcrypt": 3.0.0 "@types/debug": 4.1.5 "@types/dotenv": 8.2.0 @@ -10061,7 +10025,7 @@ fsevents@^1.2.7: languageName: node linkType: hard -"object-path@npm:^0.11.4": +"object-path@npm:0.11.5, object-path@npm:^0.11.4": version: 0.11.5 resolution: "object-path@npm:0.11.5" checksum: a2be57f65eb247161763280e857ddbafcfbb41ad7cfcfb0a78aca2e8adb990a7b5afe6b182c20baf0e218e541ec75c1807fd04d50e3049920c2ec65e6eb9c900 @@ -10473,7 +10437,7 @@ fsevents@^1.2.7: languageName: node linkType: hard -"pascal-case@npm:^3.1.1, pascal-case@npm:^3.1.2": +"pascal-case@npm:^3.1.2": version: 3.1.2 resolution: "pascal-case@npm:3.1.2" dependencies: @@ -10701,7 +10665,7 @@ fsevents@^1.2.7: languageName: node linkType: hard -"pluralize@npm:8.0.0": +"pluralize@npm:^8.0.0": version: 8.0.0 resolution: "pluralize@npm:8.0.0" checksum: 5251b470a0c8e5181ac7e1d61028553f90cb2c85c34b8e468cea269ae715499524546c2c3681029ef5697d86c54bfb12e49388f5cc6082051e84f5888588f4ec @@ -13213,6 +13177,13 @@ resolve@^2.0.0-next.3: languageName: node linkType: hard +"tslib@npm:~2.2.0": + version: 2.2.0 + resolution: "tslib@npm:2.2.0" + checksum: 2d35468c470410871c5246e43f12dcb6d0fc363b617c176f26443b9530e5c5ee8448966892a42956168d8f495da7865bda33dfe82c26c91991e28999974a618f + languageName: node + linkType: hard + "tsutils@npm:^3.17.1": version: 3.21.0 resolution: "tsutils@npm:3.21.0" From cf0abf8a5cd06d7914fbec3a1969aead3cf75e68 Mon Sep 17 00:00:00 2001 From: Daniel Starns Date: Thu, 22 Apr 2021 12:02:03 +0100 Subject: [PATCH 2/5] Refactor-Fix/remove-global-config-support-schema-directives (#165) * config: eslint disable a silly rule and remove some unmaintainable comments * package/dev: add neo4j-driver to ogm * refactor/fix: change to use makeExecutableSchema type and nest stuff inside config obj * docs: update to reflect config obj * refactor: consts at the top * fix: export type * docs: update readmes for new config key * package: update graphql tools and compose deps * refactor: change to config obj and move driver and debug back to the top level * refactor: change to config object over envs * fix: process.env removal of config * test/refactor: remove raw jwt creation * config: fix broken tsconfig json * test: fix broken type * refactor: PR requests * docs: add pesudo optional flag --- .eslintrc.js | 9 +- docs/asciidoc/api-reference.adoc | 12 +- docs/asciidoc/auth/authentication.adoc | 5 + docs/asciidoc/auth/authorization/roles.adoc | 2 +- docs/asciidoc/auth/setup.adoc | 37 +- docs/asciidoc/driver-and-config.adoc | 4 +- docs/asciidoc/getting-started.adoc | 4 +- examples/neo-push/README.md | 2 +- examples/neo-push/server/src/gql/index.ts | 7 +- .../integration/graphql/blog-auth.test.ts | 8 +- .../integration/graphql/blog-custom.test.ts | 12 +- .../integration/graphql/comment-auth.test.ts | 6 +- .../graphql/comment-custom.test.ts | 12 +- .../integration/graphql/post-auth.test.ts | 8 +- .../integration/graphql/post-custom.test.ts | 18 +- .../tests/integration/graphql/sign-in.test.ts | 2 - .../tests/integration/graphql/sign-up.test.ts | 2 - .../integration/graphql/user-auth.test.ts | 6 +- .../integration/graphql/workflow.test.ts | 6 +- .../server/tests/integration/server.ts | 14 +- examples/neo-push/server/tests/tsconfig.json | 12 +- packages/graphql/README.md | 4 +- packages/graphql/src/auth/get-jwt.ts | 14 +- packages/graphql/src/classes/Neo4jGraphQL.ts | 61 +- packages/graphql/src/classes/index.ts | 2 +- packages/graphql/src/environment.ts | 27 +- .../src/schema/make-augmented-schema.test.ts | 8 +- .../src/schema/make-augmented-schema.ts | 24 +- .../src/translate/create-auth-param.ts | 11 +- .../advanced-filtering.int.test.ts | 2 +- .../tests/integration/auth/allow.int.test.ts | 92 +- .../tests/integration/auth/bind.int.test.ts | 50 +- .../auth/custom-resolvers.int.test.ts | 21 +- .../auth/is-authenticated.int.test.ts | 28 +- .../integration/auth/object-path.int.test.ts | 29 +- .../tests/integration/auth/roles.int.test.ts | 101 +- .../tests/integration/auth/where.int.test.ts | 56 +- .../integration/custom-directives.int.test.ts | 99 ++ .../integration/custom-resolvers-int.test.ts | 20 +- .../integration/default-values.int.test.ts | 2 - .../integration/multi-database.int.test.ts | 6 +- packages/graphql/tests/tck/tck.test.ts | 36 +- packages/ogm/package.json | 1 + packages/ogm/src/classes/OGM.ts | 22 +- .../ogm/tests/integration/ogm.int.test.ts | 2 +- yarn.lock | 954 +++++++++--------- 46 files changed, 1012 insertions(+), 848 deletions(-) create mode 100644 packages/graphql/tests/integration/custom-directives.int.test.ts diff --git a/.eslintrc.js b/.eslintrc.js index 0fb377f749..12d4c796e5 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -59,11 +59,12 @@ const baseTypeScriptRules = { start of @typescript-eslint/recommended-requiring-type-checking rules TODO Over the long term, reduce our usage of `any` and switch these rules on */ - "@typescript-eslint/no-unsafe-assignment": "off", // Approximately 1100 instances - "@typescript-eslint/no-unsafe-member-access": "off", // Approximately 700 instances - "@typescript-eslint/no-unsafe-call": "off", // Approximately 500 instances + "@typescript-eslint/no-unsafe-assignment": "off", + "@typescript-eslint/no-unsafe-member-access": "off", + "@typescript-eslint/no-unsafe-call": "off", "@typescript-eslint/restrict-template-expressions": "off", // TODO Make sure variables are properly cast when using in template expressions (approximately 350 instances) - "@typescript-eslint/no-unsafe-return": "off", // Approximately 70 instances + "@typescript-eslint/no-unsafe-return": "off", + "@typescript-eslint/no-empty-interface": "off", /* end of @typescript-eslint/recommended-requiring-type-checking rules */ }; diff --git a/docs/asciidoc/api-reference.adoc b/docs/asciidoc/api-reference.adoc index 0d3d7da184..0be83b98a0 100644 --- a/docs/asciidoc/api-reference.adoc +++ b/docs/asciidoc/api-reference.adoc @@ -19,7 +19,17 @@ const neo4jGraphQL = new Neo4jGraphQL({ typeDefs, resolvers?, schemaDirectives?, - debug?, + driver? + debug? + config?: { + driverConfig?, + enableRegex?, + jwt?: { + secret?, + noVerify?, + rolesPath?, + }, + }, }); ---- diff --git a/docs/asciidoc/auth/authentication.adoc b/docs/asciidoc/auth/authentication.adoc index a85890ea58..0a656df62b 100644 --- a/docs/asciidoc/auth/authentication.adoc +++ b/docs/asciidoc/auth/authentication.adoc @@ -65,6 +65,11 @@ const neoSchema = new Neo4jGraphQL({ typeDefs, resolvers, driver, + config: { + jwt: { + secret + } + } }); const server = new ApolloServer({ diff --git a/docs/asciidoc/auth/authorization/roles.adoc b/docs/asciidoc/auth/authorization/roles.adoc index ca3707f832..50f52d5cf7 100644 --- a/docs/asciidoc/auth/authorization/roles.adoc +++ b/docs/asciidoc/auth/authorization/roles.adoc @@ -1,7 +1,7 @@ [[auth-authorization-roles]] = Roles -Use the roles property to specify the allowed roles for an operation. Use ENV `NEO4J_GRAPHQL_JWT_ROLES_OBJECT_PATH` to specify a object path for JWT roles otherwise defaults to `jwt.roles` +Use the roles property to specify the allowed roles for an operation. Use config `rolesPath` to specify a object path for JWT roles otherwise defaults to `jwt.roles` [source, graphql] ---- diff --git a/docs/asciidoc/auth/setup.adoc b/docs/asciidoc/auth/setup.adoc index d2d61f3e1b..2955c5b703 100644 --- a/docs/asciidoc/auth/setup.adoc +++ b/docs/asciidoc/auth/setup.adoc @@ -10,19 +10,21 @@ authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3O content-type: application/json ---- -== Environment Variables +== Config -.Auth Environment Variables Matrix +Auth centric values on the Config object passed to Neo4jGraphQL or OGM. + +.Auth Config |=== |Variable | Usage -|`NEO4J_GRAPHQL_JWT_SECRET` +|`secret` | Specify JWT secret -|`NEO4J_GRAPHQL_JWT_NO_VERIFY` +|`noVerify` | Disable the verification of the JW -|`NEO4J_GRAPHQL_JWT_ROLES_OBJECT_PATH` +|`rolesPath` | Specify where on the JWT the roles key is |=== @@ -31,7 +33,14 @@ Request object needs to be injected into the context before you can use auth. He [source, javascript] ---- -const neoSchema = new Neo4jGraphQL({}); +const neoSchema = new Neo4jGraphQL({ + typeDefs, + config: { + jwt: { + secret + } + } +}); const server = new ApolloServer({ schema: neoSchema.schema, @@ -110,11 +119,19 @@ If you are using 3rd party Auth solutions such as Auth0 you may find your roles } ---- -Specify the path in the environment; +Specify the key at construction: -[source, bash] +[source, javascript] ---- -$ NEO4J_GRAPHQL_JWT_ROLES_OBJECT_PATH="https://auth0.mysite.com/claims\\.https://auth0.mysite.com/claims/roles" node server +const neoSchema = new Neo4jGraphQL({ + typeDefs, + config: { + jwt: { + secret, + rolesPath: "https://auth0.mysite.com/claims\\.https://auth0.mysite.com/claims/roles" + } + } +}); ---- == Auth Value Plucking @@ -156,7 +173,7 @@ const resolvers = { } }; -const neoSchema = new Neo4jGraphQL({ typeDefs, resolvers }); +const neoSchema = new Neo4jGraphQL({ typeDefs, resolvers, config: { jwt } }); const server = new ApolloServer({ schema: neo4jGraphQL.schema, diff --git a/docs/asciidoc/driver-and-config.adoc b/docs/asciidoc/driver-and-config.adoc index ae215f51c4..593782b3ab 100644 --- a/docs/asciidoc/driver-and-config.adoc +++ b/docs/asciidoc/driver-and-config.adoc @@ -11,13 +11,13 @@ The https://github.com/neo4j/neo4j-javascript-driver[Neo4j javascript driver] mu const { Neo4jGraphQL } = require("@neo4j/graphql"); const neo4j = require("neo4j-driver"); -const neoSchema = new Neo4jGraphQL({ typeDefs, driver }); - const driver = neo4j.driver( "bolt://localhost:7687", neo4j.auth.basic("neo4j", "letmein") ); +const neoSchema = new Neo4jGraphQL({ typeDefs, driver }); + const server = new ApolloServer({ schema: neoSchema.schema, context: ({ req }) => ({ req }), diff --git a/docs/asciidoc/getting-started.adoc b/docs/asciidoc/getting-started.adoc index 4010af16f5..0c571c89ac 100644 --- a/docs/asciidoc/getting-started.adoc +++ b/docs/asciidoc/getting-started.adoc @@ -62,13 +62,13 @@ const typeDefs = ` } `; -const neoSchema = new Neo4jGraphQL({ typeDefs, driver }); - const driver = neo4j.driver( "bolt://localhost:7687", neo4j.auth.basic("neo4j", "letmein") ); +const neoSchema = new Neo4jGraphQL({ typeDefs, driver }); + const server = new ApolloServer({ schema: neoSchema.schema, context: ({ req }) => ({ req }), diff --git a/examples/neo-push/README.md b/examples/neo-push/README.md index facbb6f911..95bbfa36f6 100644 --- a/examples/neo-push/README.md +++ b/examples/neo-push/README.md @@ -121,7 +121,7 @@ This application has two custom resolvers; sign in and sign up. In the resolvers } ``` -the `.sub` property is the users id. We use `NEO4J_GRAPHQL_JWT_SECRET` env var on the sever to configure the secret, this happens to be the same env `@neo4j/graphql` looks at too. +the `.sub` property is the users id. We use `NEO4J_GRAPHQL_JWT_SECRET` env var on the sever to configure the secret. > Note to keep things simple... This application has no JWT expiry or refreshing mechanism. Patterns you would implement outside of `@neo4j/graphql` so we deemed it less important in this showcase. diff --git a/examples/neo-push/server/src/gql/index.ts b/examples/neo-push/server/src/gql/index.ts index acd27040b9..fa5ecd52d3 100644 --- a/examples/neo-push/server/src/gql/index.ts +++ b/examples/neo-push/server/src/gql/index.ts @@ -11,7 +11,7 @@ import * as config from "../config"; export const typeDefs = [User.typeDefs, Blog.typeDefs, Post.typeDefs, Comment.typeDefs]; -const resolvers = { +export const resolvers = { ...User.resolvers, }; @@ -25,6 +25,11 @@ export const neoSchema = new Neo4jGraphQL({ typeDefs, resolvers, debug: config.NODE_ENV === "development", + config: { + jwt: { + secret: config.NEO4J_GRAPHQL_JWT_SECRET, + }, + }, }); export const server: ApolloServer = new ApolloServer({ diff --git a/examples/neo-push/server/tests/integration/graphql/blog-auth.test.ts b/examples/neo-push/server/tests/integration/graphql/blog-auth.test.ts index 87cb202486..3459a37739 100644 --- a/examples/neo-push/server/tests/integration/graphql/blog-auth.test.ts +++ b/examples/neo-push/server/tests/integration/graphql/blog-auth.test.ts @@ -2,21 +2,19 @@ import { Driver } from "neo4j-driver"; import { generate } from "randomstring"; import { IncomingMessage } from "http"; import { Socket } from "net"; -import jsonwebtoken from "jsonwebtoken"; import { gql } from "apollo-server-express"; import * as neo4j from "../neo4j"; import server from "../server"; +import { createJWT } from "../../../src/utils"; describe("blog-auth", () => { let driver: Driver; beforeAll(async () => { - process.env.NEO4J_GRAPHQL_JWT_SECRET = "supersecret"; driver = await neo4j.connect(); }); afterAll(async () => { - delete process.env.NEO4J_GRAPHQL_JWT_SECRET; await driver.close(); }); @@ -37,7 +35,7 @@ describe("blog-auth", () => { } `; - const token = jsonwebtoken.sign({ sub: userId }, process.env.NEO4J_GRAPHQL_JWT_SECRET as string); + const token = await createJWT({ sub: userId }); const socket = new Socket({ readable: true }); const req = new IncomingMessage(socket); @@ -76,7 +74,7 @@ describe("blog-auth", () => { `; - const token = jsonwebtoken.sign({ sub: userId }, process.env.NEO4J_GRAPHQL_JWT_SECRET as string); + const token = await createJWT({ sub: userId }); const socket = new Socket({ readable: true }); const req = new IncomingMessage(socket); diff --git a/examples/neo-push/server/tests/integration/graphql/blog-custom.test.ts b/examples/neo-push/server/tests/integration/graphql/blog-custom.test.ts index e3fd91cd78..1ed616810f 100644 --- a/examples/neo-push/server/tests/integration/graphql/blog-custom.test.ts +++ b/examples/neo-push/server/tests/integration/graphql/blog-custom.test.ts @@ -2,21 +2,19 @@ import { Driver } from "neo4j-driver"; import { generate } from "randomstring"; import { IncomingMessage } from "http"; import { Socket } from "net"; -import jsonwebtoken from "jsonwebtoken"; import { gql } from "apollo-server-express"; import * as neo4j from "../neo4j"; import server from "../server"; +import { createJWT } from "../../../src/utils"; describe("blog-custom", () => { let driver: Driver; beforeAll(async () => { - process.env.NEO4J_GRAPHQL_JWT_SECRET = "supersecret"; driver = await neo4j.connect(); }); afterAll(async () => { - delete process.env.NEO4J_GRAPHQL_JWT_SECRET; await driver.close(); }); @@ -41,7 +39,7 @@ describe("blog-custom", () => { `; - const token = jsonwebtoken.sign({ sub: userId }, process.env.NEO4J_GRAPHQL_JWT_SECRET as string); + const token = await createJWT({ sub: userId }); const socket = new Socket({ readable: true }); const req = new IncomingMessage(socket); @@ -86,7 +84,7 @@ describe("blog-custom", () => { `; - const token = jsonwebtoken.sign({ sub: userId }, process.env.NEO4J_GRAPHQL_JWT_SECRET as string); + const token = await createJWT({ sub: userId }); const socket = new Socket({ readable: true }); const req = new IncomingMessage(socket); @@ -134,7 +132,7 @@ describe("blog-custom", () => { `; - const token = jsonwebtoken.sign({ sub: userId }, process.env.NEO4J_GRAPHQL_JWT_SECRET as string); + const token = await createJWT({ sub: userId }); const socket = new Socket({ readable: true }); const req = new IncomingMessage(socket); @@ -179,7 +177,7 @@ describe("blog-custom", () => { `; - const token = jsonwebtoken.sign({ sub: userId }, process.env.NEO4J_GRAPHQL_JWT_SECRET as string); + const token = await createJWT({ sub: userId }); const socket = new Socket({ readable: true }); const req = new IncomingMessage(socket); diff --git a/examples/neo-push/server/tests/integration/graphql/comment-auth.test.ts b/examples/neo-push/server/tests/integration/graphql/comment-auth.test.ts index 87ced36496..41703f1808 100644 --- a/examples/neo-push/server/tests/integration/graphql/comment-auth.test.ts +++ b/examples/neo-push/server/tests/integration/graphql/comment-auth.test.ts @@ -2,21 +2,19 @@ import { Driver } from "neo4j-driver"; import { generate } from "randomstring"; import { IncomingMessage } from "http"; import { Socket } from "net"; -import jsonwebtoken from "jsonwebtoken"; import { gql } from "apollo-server-express"; import * as neo4j from "../neo4j"; import server from "../server"; +import { createJWT } from "../../../src/utils"; describe("comment-auth", () => { let driver: Driver; beforeAll(async () => { - process.env.NEO4J_GRAPHQL_JWT_SECRET = "supersecret"; driver = await neo4j.connect(); }); afterAll(async () => { - delete process.env.NEO4J_GRAPHQL_JWT_SECRET; await driver.close(); }); @@ -37,7 +35,7 @@ describe("comment-auth", () => { } `; - const token = jsonwebtoken.sign({ sub: userId }, process.env.NEO4J_GRAPHQL_JWT_SECRET as string); + const token = await createJWT({ sub: userId }); const socket = new Socket({ readable: true }); const req = new IncomingMessage(socket); diff --git a/examples/neo-push/server/tests/integration/graphql/comment-custom.test.ts b/examples/neo-push/server/tests/integration/graphql/comment-custom.test.ts index 3fa8e4e7d6..cfebfba9f3 100644 --- a/examples/neo-push/server/tests/integration/graphql/comment-custom.test.ts +++ b/examples/neo-push/server/tests/integration/graphql/comment-custom.test.ts @@ -2,21 +2,19 @@ import { Driver } from "neo4j-driver"; import { generate } from "randomstring"; import { IncomingMessage } from "http"; import { Socket } from "net"; -import jsonwebtoken from "jsonwebtoken"; import { gql } from "apollo-server-express"; import * as neo4j from "../neo4j"; import server from "../server"; +import { createJWT } from "../../../src/utils"; describe("comment-custom", () => { let driver: Driver; beforeAll(async () => { - process.env.NEO4J_GRAPHQL_JWT_SECRET = "supersecret"; driver = await neo4j.connect(); }); afterAll(async () => { - delete process.env.NEO4J_GRAPHQL_JWT_SECRET; await driver.close(); }); @@ -49,7 +47,7 @@ describe("comment-custom", () => { `; - const token = jsonwebtoken.sign({ sub: userId }, process.env.NEO4J_GRAPHQL_JWT_SECRET as string); + const token = await createJWT({ sub: userId }); const socket = new Socket({ readable: true }); const req = new IncomingMessage(socket); @@ -104,7 +102,7 @@ describe("comment-custom", () => { `; - const token = jsonwebtoken.sign({ sub: userId }, process.env.NEO4J_GRAPHQL_JWT_SECRET as string); + const token = await createJWT({ sub: userId }); const socket = new Socket({ readable: true }); const req = new IncomingMessage(socket); @@ -159,7 +157,7 @@ describe("comment-custom", () => { `; - const token = jsonwebtoken.sign({ sub: userId }, process.env.NEO4J_GRAPHQL_JWT_SECRET as string); + const token = await createJWT({ sub: userId }); const socket = new Socket({ readable: true }); const req = new IncomingMessage(socket); @@ -217,7 +215,7 @@ describe("comment-custom", () => { `; - const token = jsonwebtoken.sign({ sub: userId }, process.env.NEO4J_GRAPHQL_JWT_SECRET as string); + const token = await createJWT({ sub: userId }); const socket = new Socket({ readable: true }); const req = new IncomingMessage(socket); diff --git a/examples/neo-push/server/tests/integration/graphql/post-auth.test.ts b/examples/neo-push/server/tests/integration/graphql/post-auth.test.ts index 9a22dc4889..e6781fe7d4 100644 --- a/examples/neo-push/server/tests/integration/graphql/post-auth.test.ts +++ b/examples/neo-push/server/tests/integration/graphql/post-auth.test.ts @@ -2,21 +2,19 @@ import { Driver } from "neo4j-driver"; import { generate } from "randomstring"; import { IncomingMessage } from "http"; import { Socket } from "net"; -import jsonwebtoken from "jsonwebtoken"; import { gql } from "apollo-server-express"; import * as neo4j from "../neo4j"; import server from "../server"; +import { createJWT } from "../../../src/utils"; describe("post-auth", () => { let driver: Driver; beforeAll(async () => { - process.env.NEO4J_GRAPHQL_JWT_SECRET = "supersecret"; driver = await neo4j.connect(); }); afterAll(async () => { - delete process.env.NEO4J_GRAPHQL_JWT_SECRET; await driver.close(); }); @@ -41,7 +39,7 @@ describe("post-auth", () => { } `; - const token = jsonwebtoken.sign({ sub: userId }, process.env.NEO4J_GRAPHQL_JWT_SECRET as string); + const token = await createJWT({ sub: userId }); const socket = new Socket({ readable: true }); const req = new IncomingMessage(socket); @@ -79,7 +77,7 @@ describe("post-auth", () => { } `; - const token = jsonwebtoken.sign({ sub: userId }, process.env.NEO4J_GRAPHQL_JWT_SECRET as string); + const token = await createJWT({ sub: userId }); const socket = new Socket({ readable: true }); const req = new IncomingMessage(socket); diff --git a/examples/neo-push/server/tests/integration/graphql/post-custom.test.ts b/examples/neo-push/server/tests/integration/graphql/post-custom.test.ts index be5ecc96cd..9ba842af88 100644 --- a/examples/neo-push/server/tests/integration/graphql/post-custom.test.ts +++ b/examples/neo-push/server/tests/integration/graphql/post-custom.test.ts @@ -2,21 +2,19 @@ import { Driver } from "neo4j-driver"; import { generate } from "randomstring"; import { IncomingMessage } from "http"; import { Socket } from "net"; -import jsonwebtoken from "jsonwebtoken"; import { gql } from "apollo-server-express"; import * as neo4j from "../neo4j"; import server from "../server"; +import { createJWT } from "../../../src/utils"; describe("post-custom", () => { let driver: Driver; beforeAll(async () => { - process.env.NEO4J_GRAPHQL_JWT_SECRET = "supersecret"; driver = await neo4j.connect(); }); afterAll(async () => { - delete process.env.NEO4J_GRAPHQL_JWT_SECRET; await driver.close(); }); @@ -45,7 +43,7 @@ describe("post-custom", () => { `; - const token = jsonwebtoken.sign({ sub: userId }, process.env.NEO4J_GRAPHQL_JWT_SECRET as string); + const token = await createJWT({ sub: userId }); const socket = new Socket({ readable: true }); const req = new IncomingMessage(socket); @@ -96,7 +94,7 @@ describe("post-custom", () => { `; - const token = jsonwebtoken.sign({ sub: userId }, process.env.NEO4J_GRAPHQL_JWT_SECRET as string); + const token = await createJWT({ sub: userId }); const socket = new Socket({ readable: true }); const req = new IncomingMessage(socket); @@ -147,7 +145,7 @@ describe("post-custom", () => { `; - const token = jsonwebtoken.sign({ sub: userId }, process.env.NEO4J_GRAPHQL_JWT_SECRET as string); + const token = await createJWT({ sub: userId }); const socket = new Socket({ readable: true }); const req = new IncomingMessage(socket); @@ -201,7 +199,7 @@ describe("post-custom", () => { `; - const token = jsonwebtoken.sign({ sub: userId }, process.env.NEO4J_GRAPHQL_JWT_SECRET as string); + const token = await createJWT({ sub: userId }); const socket = new Socket({ readable: true }); const req = new IncomingMessage(socket); @@ -254,7 +252,7 @@ describe("post-custom", () => { `; - const token = jsonwebtoken.sign({ sub: userId }, process.env.NEO4J_GRAPHQL_JWT_SECRET as string); + const token = await createJWT({ sub: userId }); const socket = new Socket({ readable: true }); const req = new IncomingMessage(socket); @@ -305,7 +303,7 @@ describe("post-custom", () => { `; - const token = jsonwebtoken.sign({ sub: userId }, process.env.NEO4J_GRAPHQL_JWT_SECRET as string); + const token = await createJWT({ sub: userId }); const socket = new Socket({ readable: true }); const req = new IncomingMessage(socket); @@ -360,7 +358,7 @@ describe("post-custom", () => { `; - const token = jsonwebtoken.sign({ sub: userId }, process.env.NEO4J_GRAPHQL_JWT_SECRET as string); + const token = await createJWT({ sub: userId }); const socket = new Socket({ readable: true }); const req = new IncomingMessage(socket); diff --git a/examples/neo-push/server/tests/integration/graphql/sign-in.test.ts b/examples/neo-push/server/tests/integration/graphql/sign-in.test.ts index f2d29e8f50..562c66e25e 100644 --- a/examples/neo-push/server/tests/integration/graphql/sign-in.test.ts +++ b/examples/neo-push/server/tests/integration/graphql/sign-in.test.ts @@ -8,12 +8,10 @@ describe("signIn", () => { let driver: Driver; beforeAll(async () => { - process.env.NEO4J_GRAPHQL_JWT_SECRET = "supersecret"; driver = await neo4j.connect(); }); afterAll(async () => { - delete process.env.NEO4J_GRAPHQL_JWT_SECRET; await driver.close(); }); diff --git a/examples/neo-push/server/tests/integration/graphql/sign-up.test.ts b/examples/neo-push/server/tests/integration/graphql/sign-up.test.ts index 8cbc844758..59c8a3db8f 100644 --- a/examples/neo-push/server/tests/integration/graphql/sign-up.test.ts +++ b/examples/neo-push/server/tests/integration/graphql/sign-up.test.ts @@ -8,12 +8,10 @@ describe("signUp", () => { let driver: Driver; beforeAll(async () => { - process.env.NEO4J_GRAPHQL_JWT_SECRET = "supersecret"; driver = await neo4j.connect(); }); afterAll(async () => { - delete process.env.NEO4J_GRAPHQL_JWT_SECRET; await driver.close(); }); diff --git a/examples/neo-push/server/tests/integration/graphql/user-auth.test.ts b/examples/neo-push/server/tests/integration/graphql/user-auth.test.ts index 3c12cc92e4..55a3ebab2a 100644 --- a/examples/neo-push/server/tests/integration/graphql/user-auth.test.ts +++ b/examples/neo-push/server/tests/integration/graphql/user-auth.test.ts @@ -2,21 +2,19 @@ import { Driver } from "neo4j-driver"; import { generate } from "randomstring"; import { IncomingMessage } from "http"; import { Socket } from "net"; -import jsonwebtoken from "jsonwebtoken"; import { gql } from "apollo-server-express"; import * as neo4j from "../neo4j"; import server from "../server"; +import { createJWT } from "../../../src/utils"; describe("user-auth", () => { let driver: Driver; beforeAll(async () => { - process.env.NEO4J_GRAPHQL_JWT_SECRET = "supersecret"; driver = await neo4j.connect(); }); afterAll(async () => { - delete process.env.NEO4J_GRAPHQL_JWT_SECRET; await driver.close(); }); @@ -39,7 +37,7 @@ describe("user-auth", () => { } `; - const token = jsonwebtoken.sign({ sub: userId }, process.env.NEO4J_GRAPHQL_JWT_SECRET as string); + const token = await createJWT({ sub: userId }); const socket = new Socket({ readable: true }); const req = new IncomingMessage(socket); diff --git a/examples/neo-push/server/tests/integration/graphql/workflow.test.ts b/examples/neo-push/server/tests/integration/graphql/workflow.test.ts index ce511412dc..a380774e1e 100644 --- a/examples/neo-push/server/tests/integration/graphql/workflow.test.ts +++ b/examples/neo-push/server/tests/integration/graphql/workflow.test.ts @@ -2,21 +2,19 @@ import { Driver } from "neo4j-driver"; import { generate } from "randomstring"; import { IncomingMessage } from "http"; import { Socket } from "net"; -import jsonwebtoken from "jsonwebtoken"; import { gql } from "apollo-server-express"; import * as neo4j from "../neo4j"; import server from "../server"; +import { createJWT } from "../../../src/utils"; describe("workflow", () => { let driver: Driver; beforeAll(async () => { - process.env.NEO4J_GRAPHQL_JWT_SECRET = "supersecret"; driver = await neo4j.connect(); }); afterAll(async () => { - delete process.env.NEO4J_GRAPHQL_JWT_SECRET; await driver.close(); }); @@ -63,7 +61,7 @@ describe("workflow", () => { }), }; - const token = jsonwebtoken.sign({ sub: user.id }, process.env.NEO4J_GRAPHQL_JWT_SECRET as string); + const token = await createJWT({ sub: user.id }); const socket = new Socket({ readable: true }); const req = new IncomingMessage(socket); diff --git a/examples/neo-push/server/tests/integration/server.ts b/examples/neo-push/server/tests/integration/server.ts index ad97f48c49..98e6a6a803 100644 --- a/examples/neo-push/server/tests/integration/server.ts +++ b/examples/neo-push/server/tests/integration/server.ts @@ -1,8 +1,10 @@ import { ApolloServer } from "apollo-server-express"; import { createTestClient } from "apollo-server-testing"; import { OGM } from "@neo4j/graphql-ogm"; -import { neoSchema, typeDefs } from "../../src/gql"; +import { Neo4jGraphQL } from "@neo4j/graphql"; +import { typeDefs, resolvers } from "../../src/gql"; import { Context } from "../../src/types"; +import * as config from "../../src/config"; function server(driver, context = {}) { const ogm = new OGM({ @@ -10,6 +12,16 @@ function server(driver, context = {}) { driver, }); + const neoSchema = new Neo4jGraphQL({ + typeDefs, + resolvers, + config: { + jwt: { + secret: config.NEO4J_GRAPHQL_JWT_SECRET, + }, + }, + }); + const apolloServer = new ApolloServer({ schema: neoSchema.schema, context: () => ({ ...context, driver, ogm } as Context), diff --git a/examples/neo-push/server/tests/tsconfig.json b/examples/neo-push/server/tests/tsconfig.json index 4e2dd15c36..f655c2fb96 100644 --- a/examples/neo-push/server/tests/tsconfig.json +++ b/examples/neo-push/server/tests/tsconfig.json @@ -1,7 +1,15 @@ { "extends": "../../../../tsconfig.base.json", "compilerOptions": { - "types": ["node", "jest"] + "types": ["node", "jest"], + "paths": { + "@neo4j/graphql": ["../../../../packages/graphql/src"], + "@neo4j/graphql-ogm": ["../../../../packages/ogm/src"] + } }, - "references": [{ "path": "../src/tsconfig.json" }] + "references": [ + { "path": "../src/tsconfig.json" }, + { "path": "../../../../packages/ogm/src/tsconfig.json" }, + { "path": "../../../../packages/graphql/src/tsconfig.json" } + ] } diff --git a/packages/graphql/README.md b/packages/graphql/README.md index e97a3327e9..6abe5977d9 100644 --- a/packages/graphql/README.md +++ b/packages/graphql/README.md @@ -49,7 +49,7 @@ const typeDefs = ` } `; -const neoSchema = new Neo4jGraphQL({ typeDefs }); +const neoSchema = new Neo4jGraphQL({ typeDefs, driver }); const driver = neo4j.driver( "bolt://localhost:7687", @@ -58,7 +58,7 @@ const driver = neo4j.driver( const server = new ApolloServer({ schema: neoSchema.schema, - context: ({ req }) => ({ req, driver }), + context: ({ req }) => ({ req }), }); server.listen(4000).then(() => console.log("Online")); diff --git a/packages/graphql/src/auth/get-jwt.ts b/packages/graphql/src/auth/get-jwt.ts index 28995eee4a..dc79043001 100644 --- a/packages/graphql/src/auth/get-jwt.ts +++ b/packages/graphql/src/auth/get-jwt.ts @@ -19,9 +19,9 @@ import { IncomingMessage } from "http"; import jsonwebtoken from "jsonwebtoken"; -import environment from "../environment"; +import { Context } from "../types"; -function getJWT(context: any): any { +function getJWT(context: Context): any { const req = context instanceof IncomingMessage ? context : context.req || context.request; let result; @@ -40,11 +40,17 @@ function getJWT(context: any): any { return result; } + const jwtConfig = context.neoSchema.config?.jwt; + + if (!jwtConfig) { + return result; + } + try { - if (!environment.NEO4J_GRAPHQL_JWT_SECRET && environment.NEO4J_GRAPHQL_JWT_NO_VERIFY) { + if (jwtConfig.noVerify) { result = jsonwebtoken.decode(token); } else { - result = jsonwebtoken.verify(token, environment.NEO4J_GRAPHQL_JWT_SECRET as string, { + result = jsonwebtoken.verify(token, jwtConfig.secret, { algorithms: ["HS256", "RS256"], }); } diff --git a/packages/graphql/src/classes/Neo4jGraphQL.ts b/packages/graphql/src/classes/Neo4jGraphQL.ts index a0ac99cd12..3f96c651ce 100644 --- a/packages/graphql/src/classes/Neo4jGraphQL.ts +++ b/packages/graphql/src/classes/Neo4jGraphQL.ts @@ -27,17 +27,22 @@ import Node from "./Node"; import { checkNeo4jCompat } from "../utils"; import { getJWT } from "../auth/index"; -type IResolvers = IExecutableSchemaDefinition["resolvers"]; -type ITypeDefinitions = IExecutableSchemaDefinition["typeDefs"]; -type SchemaDirectives = IExecutableSchemaDefinition["schemaDirectives"]; - -export interface Neo4jGraphQLConstructor { - typeDefs: ITypeDefinitions; - resolvers?: IResolvers; - schemaDirectives?: SchemaDirectives; - debug?: boolean | ((message: string) => void); - driver?: Driver; +export interface Neo4jGraphQLJWT { + secret: string; + noVerify?: string; + rolesPath?: string; +} + +export interface Neo4jGraphQLConfig { driverConfig?: DriverConfig; + jwt?: Neo4jGraphQLJWT; + enableRegex?: boolean; +} + +export interface Neo4jGraphQLConstructor extends IExecutableSchemaDefinition { + config?: Neo4jGraphQLConfig; + driver?: Driver; + debug?: boolean | ((message: string) => void); } class Neo4jGraphQL { @@ -49,7 +54,7 @@ class Neo4jGraphQL { private driver?: Driver; - private driverConfig?: DriverConfig; + public config?: Neo4jGraphQLConfig; // eslint-disable-next-line @typescript-eslint/no-unused-vars,class-methods-use-this debug(message: string): void { @@ -57,41 +62,37 @@ class Neo4jGraphQL { } constructor(input: Neo4jGraphQLConstructor) { - this.driver = input.driver; - this.driverConfig = input.driverConfig; + const { config = {}, debug, driver, ...schemaDefinition } = input; + const { nodes, schema } = makeAugmentedSchema(schemaDefinition, { enableRegex: config.enableRegex }); - const { nodes, schema } = makeAugmentedSchema({ - typeDefs: input.typeDefs, - resolvers: input.resolvers, - schemaDirectives: input.schemaDirectives, - }); - - if (input.debug) { + if (debug) { // eslint-disable-next-line no-console let logger = console.log; - if (typeof input.debug === "function") { - logger = input.debug; + if (typeof debug === "function") { + logger = debug; } this.debug = (message: string) => logger(message); } + this.driver = driver; + this.config = config; this.nodes = nodes; - this.schema = this.createWrappedSchema({ schema, driver: input.driver, driverConfig: input.driverConfig }); + this.schema = this.createWrappedSchema({ schema, config }); this.document = parse(printSchema(schema)); } private createWrappedSchema({ schema, - driver, - driverConfig, + config, }: { schema: GraphQLSchema; - driver?: Driver; - driverConfig?: DriverConfig; + config: Neo4jGraphQLConfig; }): GraphQLSchema { return addSchemaLevelResolver(schema, (_obj, _args, context: any, resolveInfo: any) => { + const { driverConfig } = config; + /* Deleting this property ensures that we call this function more than once, See https://github.com/ardatan/graphql-tools/issues/353#issuecomment-499569711 @@ -100,12 +101,12 @@ class Neo4jGraphQL { delete resolveInfo.operation.__runAtMostOnce; if (!context?.driver) { - if (!driver) { + if (!this.driver) { throw new Error( "A Neo4j driver instance must either be passed to Neo4jGraphQL on construction, or passed as context.driver in each request." ); } - context.driver = driver; + context.driver = this.driver; } if (!context?.driverConfig) { @@ -120,7 +121,7 @@ class Neo4jGraphQL { async checkNeo4jCompat(input: { driver?: Driver; driverConfig?: DriverConfig } = {}): Promise { const driver = input.driver || this.driver; - const driverConfig = input.driverConfig || this.driverConfig; + const driverConfig = input.driverConfig || this.config?.driverConfig; if (!driver) { throw new Error("neo4j-driver Driver missing"); diff --git a/packages/graphql/src/classes/index.ts b/packages/graphql/src/classes/index.ts index 62c68a5f19..1004293c31 100644 --- a/packages/graphql/src/classes/index.ts +++ b/packages/graphql/src/classes/index.ts @@ -19,5 +19,5 @@ export { default as Node, NodeConstructor } from "./Node"; export { default as Exclude, ExcludeConstructor } from "./Exclude"; -export { default as Neo4jGraphQL, Neo4jGraphQLConstructor } from "./Neo4jGraphQL"; +export { default as Neo4jGraphQL, Neo4jGraphQLConstructor, Neo4jGraphQLConfig } from "./Neo4jGraphQL"; export * from "./Error"; diff --git a/packages/graphql/src/environment.ts b/packages/graphql/src/environment.ts index 00bbba0eaa..d8794aea79 100644 --- a/packages/graphql/src/environment.ts +++ b/packages/graphql/src/environment.ts @@ -17,32 +17,9 @@ * limitations under the License. */ -/* Getters: - https://stackoverflow.com/questions/45194598/using-process-env-in-typescript - https://dev.to/isthatcentered/typing-process-env-and-dealing-with-nodeenv-3ilm - If you just do; - exports const NEO4J_GRAPHQL_JWT_ROLES_OBJECT_PATH = process.env.NEO4J_GRAPHQL_JWT_ROLES_OBJECT_PATH; - the const will be undefined. -*/ const environment = { - get NEO4J_GRAPHQL_JWT_SECRET() { - return process.env.NEO4J_GRAPHQL_JWT_SECRET; - }, - get NEO4J_GRAPHQL_JWT_NO_VERIFY() { - return Boolean(process.env.NEO4J_GRAPHQL_JWT_NO_VERIFY || false); - }, - get NEO4J_GRAPHQL_ENABLE_REGEX() { - return Boolean(process.env.NEO4J_GRAPHQL_ENABLE_REGEX || false); - }, - get NEO4J_GRAPHQL_JWT_ROLES_OBJECT_PATH() { - return process.env.NEO4J_GRAPHQL_JWT_ROLES_OBJECT_PATH; - }, - get NPM_PACKAGE_VERSION() { - return process.env.NPM_PACKAGE_VERSION as string; - }, - get NPM_PACKAGE_NAME() { - return process.env.NPM_PACKAGE_NAME as string; - }, + NPM_PACKAGE_VERSION: process.env.NPM_PACKAGE_VERSION as string, + NPM_PACKAGE_NAME: process.env.NPM_PACKAGE_NAME as string, }; export default environment; diff --git a/packages/graphql/src/schema/make-augmented-schema.test.ts b/packages/graphql/src/schema/make-augmented-schema.test.ts index c5a02aa91a..dbd1f62199 100644 --- a/packages/graphql/src/schema/make-augmented-schema.test.ts +++ b/packages/graphql/src/schema/make-augmented-schema.test.ts @@ -202,15 +202,15 @@ describe("makeAugmentedSchema", () => { expect(matchesField).toBeUndefined(); }); + test("should add the MATCHES filter when NEO4J_GRAPHQL_ENABLE_REGEX is set", () => { - process.env.NEO4J_GRAPHQL_ENABLE_REGEX = "true"; const typeDefs = ` type Node { name: String } `; - const neoSchema = makeAugmentedSchema({ typeDefs }); + const neoSchema = makeAugmentedSchema({ typeDefs }, { enableRegex: true }); const document = parse(printSchema(neoSchema.schema)); @@ -222,9 +222,5 @@ describe("makeAugmentedSchema", () => { expect(matchesField).not.toBeUndefined(); }); - - afterEach(() => { - delete process.env.NEO4J_GRAPHQL_ENABLE_REGEX; - }); }); }); diff --git a/packages/graphql/src/schema/make-augmented-schema.ts b/packages/graphql/src/schema/make-augmented-schema.ts index 926f5724cf..37e18b11b2 100644 --- a/packages/graphql/src/schema/make-augmented-schema.ts +++ b/packages/graphql/src/schema/make-augmented-schema.ts @@ -54,21 +54,11 @@ import getObjFieldMeta from "./get-obj-field-meta"; import * as point from "./point"; import { graphqlDirectivesToCompose, objectFieldsToComposeFields } from "./to-compose"; import validateTypeDefs from "./validation"; -import environment from "../environment"; - -type IResolvers = IExecutableSchemaDefinition["resolvers"]; -type ITypeDefinitions = IExecutableSchemaDefinition["typeDefs"]; -type SchemaDirectives = IExecutableSchemaDefinition["schemaDirectives"]; - -function makeAugmentedSchema({ - typeDefs, - resolvers, - schemaDirectives, -}: { - typeDefs: ITypeDefinitions; - resolvers?: IResolvers; - schemaDirectives?: SchemaDirectives; -}): { schema: GraphQLSchema; nodes: Node[] } { + +function makeAugmentedSchema( + { typeDefs, resolvers, ...schemaDefinition }: IExecutableSchemaDefinition, + { enableRegex }: { enableRegex?: boolean } = {} +): { schema: GraphQLSchema; nodes: Node[] } { const document = mergeTypeDefs(Array.isArray(typeDefs) ? (typeDefs as string[]) : [typeDefs as string]); validateTypeDefs(document); @@ -300,7 +290,7 @@ function makeAugmentedSchema({ } if (["String", "ID"].includes(f.typeMeta.name)) { - if (environment.NEO4J_GRAPHQL_ENABLE_REGEX) { + if (enableRegex) { res[`${f.fieldName}_MATCHES`] = "String"; } @@ -765,9 +755,9 @@ function makeAugmentedSchema({ }); const schema = makeExecutableSchema({ + ...schemaDefinition, typeDefs: generatedTypeDefs, resolvers: generatedResolvers, - schemaDirectives, }); return { diff --git a/packages/graphql/src/translate/create-auth-param.ts b/packages/graphql/src/translate/create-auth-param.ts index 4624e48528..cb94160df0 100644 --- a/packages/graphql/src/translate/create-auth-param.ts +++ b/packages/graphql/src/translate/create-auth-param.ts @@ -19,7 +19,6 @@ import dotProp from "dot-prop"; import { Context } from "../types"; -import environment from "../environment"; function createAuthParam({ context }: { context: Context }) { const { jwt } = context; @@ -33,8 +32,14 @@ function createAuthParam({ context }: { context: Context }) { return param; } - if (environment.NEO4J_GRAPHQL_JWT_ROLES_OBJECT_PATH) { - param.roles = dotProp.get(jwt, environment.NEO4J_GRAPHQL_JWT_ROLES_OBJECT_PATH); + const jwtConfig = context.neoSchema.config?.jwt; + + if (!jwtConfig) { + return param; + } + + if (jwtConfig.rolesPath) { + param.roles = dotProp.get(jwt, jwtConfig.rolesPath); } else if (jwt.roles) { param.roles = jwt.roles; } diff --git a/packages/graphql/tests/integration/advanced-filtering.int.test.ts b/packages/graphql/tests/integration/advanced-filtering.int.test.ts index 0e85e733a4..7e32eb5ba8 100644 --- a/packages/graphql/tests/integration/advanced-filtering.int.test.ts +++ b/packages/graphql/tests/integration/advanced-filtering.int.test.ts @@ -122,7 +122,7 @@ describe("Advanced Filtering", () => { } `; - const neoSchema = new Neo4jGraphQL({ typeDefs }); + const neoSchema = new Neo4jGraphQL({ typeDefs, config: { enableRegex: true } }); const value = generate({ readable: true, diff --git a/packages/graphql/tests/integration/auth/allow.int.test.ts b/packages/graphql/tests/integration/auth/allow.int.test.ts index a8a4102eea..2b31aed4fe 100644 --- a/packages/graphql/tests/integration/auth/allow.int.test.ts +++ b/packages/graphql/tests/integration/auth/allow.int.test.ts @@ -31,12 +31,10 @@ describe("auth/allow", () => { beforeAll(async () => { driver = await neo4j(); - process.env.NEO4J_GRAPHQL_JWT_SECRET = "secret"; }); afterAll(async () => { await driver.close(); - delete process.env.NEO4J_GRAPHQL_JWT_SECRET; }); describe("read", () => { @@ -63,15 +61,17 @@ describe("auth/allow", () => { } `; + const secret = "secret"; + const token = jsonwebtoken.sign( { roles: [], sub: "invalid", }, - process.env.NEO4J_GRAPHQL_JWT_SECRET as string + secret ); - const neoSchema = new Neo4jGraphQL({ typeDefs }); + const neoSchema = new Neo4jGraphQL({ typeDefs, config: { jwt: { secret } } }); try { await session.run(` @@ -119,15 +119,17 @@ describe("auth/allow", () => { } `; + const secret = "secret"; + const token = jsonwebtoken.sign( { roles: [], sub: "invalid", }, - process.env.NEO4J_GRAPHQL_JWT_SECRET as string + secret ); - const neoSchema = new Neo4jGraphQL({ typeDefs }); + const neoSchema = new Neo4jGraphQL({ typeDefs, config: { jwt: { secret } } }); try { await session.run(` @@ -186,15 +188,17 @@ describe("auth/allow", () => { } `; + const secret = "secret"; + const token = jsonwebtoken.sign( { roles: [], sub: "invalid", }, - process.env.NEO4J_GRAPHQL_JWT_SECRET as string + secret ); - const neoSchema = new Neo4jGraphQL({ typeDefs }); + const neoSchema = new Neo4jGraphQL({ typeDefs, config: { jwt: { secret } } }); try { await session.run(` @@ -255,15 +259,17 @@ describe("auth/allow", () => { } `; + const secret = "secret"; + const token = jsonwebtoken.sign( { roles: [], sub: "invalid", }, - process.env.NEO4J_GRAPHQL_JWT_SECRET as string + secret ); - const neoSchema = new Neo4jGraphQL({ typeDefs }); + const neoSchema = new Neo4jGraphQL({ typeDefs, config: { jwt: { secret } } }); try { await session.run(` @@ -338,15 +344,17 @@ describe("auth/allow", () => { } `; + const secret = "secret"; + const token = jsonwebtoken.sign( { roles: [], sub: "invalid", }, - process.env.NEO4J_GRAPHQL_JWT_SECRET as string + secret ); - const neoSchema = new Neo4jGraphQL({ typeDefs }); + const neoSchema = new Neo4jGraphQL({ typeDefs, config: { jwt: { secret } } }); try { await session.run(` @@ -397,15 +405,17 @@ describe("auth/allow", () => { } `; + const secret = "secret"; + const token = jsonwebtoken.sign( { roles: [], sub: "invalid", }, - process.env.NEO4J_GRAPHQL_JWT_SECRET as string + secret ); - const neoSchema = new Neo4jGraphQL({ typeDefs }); + const neoSchema = new Neo4jGraphQL({ typeDefs, config: { jwt: { secret } } }); try { await session.run(` @@ -456,15 +466,17 @@ describe("auth/allow", () => { } `; + const secret = "secret"; + const token = jsonwebtoken.sign( { roles: [], sub: "invalid", }, - process.env.NEO4J_GRAPHQL_JWT_SECRET as string + secret ); - const neoSchema = new Neo4jGraphQL({ typeDefs }); + const neoSchema = new Neo4jGraphQL({ typeDefs, config: { jwt: { secret } } }); try { await session.run(` @@ -525,15 +537,17 @@ describe("auth/allow", () => { } `; + const secret = "secret"; + const token = jsonwebtoken.sign( { roles: [], sub: "invalid", }, - process.env.NEO4J_GRAPHQL_JWT_SECRET as string + secret ); - const neoSchema = new Neo4jGraphQL({ typeDefs }); + const neoSchema = new Neo4jGraphQL({ typeDefs, config: { jwt: { secret } } }); try { await session.run(` @@ -596,15 +610,17 @@ describe("auth/allow", () => { } `; + const secret = "secret"; + const token = jsonwebtoken.sign( { roles: [], sub: "invalid", }, - process.env.NEO4J_GRAPHQL_JWT_SECRET as string + secret ); - const neoSchema = new Neo4jGraphQL({ typeDefs }); + const neoSchema = new Neo4jGraphQL({ typeDefs, config: { jwt: { secret } } }); try { await session.run(` @@ -654,15 +670,17 @@ describe("auth/allow", () => { } `; + const secret = "secret"; + const token = jsonwebtoken.sign( { roles: [], sub: "invalid", }, - process.env.NEO4J_GRAPHQL_JWT_SECRET as string + secret ); - const neoSchema = new Neo4jGraphQL({ typeDefs }); + const neoSchema = new Neo4jGraphQL({ typeDefs, config: { jwt: { secret } } }); try { await session.run(` @@ -728,15 +746,17 @@ describe("auth/allow", () => { } `; + const secret = "secret"; + const token = jsonwebtoken.sign( { roles: [], sub: "invalid", }, - process.env.NEO4J_GRAPHQL_JWT_SECRET as string + secret ); - const neoSchema = new Neo4jGraphQL({ typeDefs }); + const neoSchema = new Neo4jGraphQL({ typeDefs, config: { jwt: { secret } } }); try { await session.run(` @@ -799,15 +819,17 @@ describe("auth/allow", () => { } `; + const secret = "secret"; + const token = jsonwebtoken.sign( { roles: [], sub: "invalid", }, - process.env.NEO4J_GRAPHQL_JWT_SECRET as string + secret ); - const neoSchema = new Neo4jGraphQL({ typeDefs }); + const neoSchema = new Neo4jGraphQL({ typeDefs, config: { jwt: { secret } } }); try { await session.run(` @@ -889,15 +911,17 @@ describe("auth/allow", () => { } `; + const secret = "secret"; + const token = jsonwebtoken.sign( { roles: [], sub: "invalid", }, - process.env.NEO4J_GRAPHQL_JWT_SECRET as string + secret ); - const neoSchema = new Neo4jGraphQL({ typeDefs }); + const neoSchema = new Neo4jGraphQL({ typeDefs, config: { jwt: { secret } } }); try { await session.run(` @@ -962,15 +986,17 @@ describe("auth/allow", () => { } `; + const secret = "secret"; + const token = jsonwebtoken.sign( { roles: [], sub: "invalid", }, - process.env.NEO4J_GRAPHQL_JWT_SECRET as string + secret ); - const neoSchema = new Neo4jGraphQL({ typeDefs }); + const neoSchema = new Neo4jGraphQL({ typeDefs, config: { jwt: { secret } } }); try { await session.run(` @@ -1053,15 +1079,17 @@ describe("auth/allow", () => { } `; + const secret = "secret"; + const token = jsonwebtoken.sign( { roles: [], sub: "invalid", }, - process.env.NEO4J_GRAPHQL_JWT_SECRET as string + secret ); - const neoSchema = new Neo4jGraphQL({ typeDefs }); + const neoSchema = new Neo4jGraphQL({ typeDefs, config: { jwt: { secret } } }); try { await session.run(` diff --git a/packages/graphql/tests/integration/auth/bind.int.test.ts b/packages/graphql/tests/integration/auth/bind.int.test.ts index cabe6353a6..f9680bdc58 100644 --- a/packages/graphql/tests/integration/auth/bind.int.test.ts +++ b/packages/graphql/tests/integration/auth/bind.int.test.ts @@ -31,12 +31,10 @@ describe("auth/bind", () => { beforeAll(async () => { driver = await neo4j(); - process.env.NEO4J_GRAPHQL_JWT_SECRET = "secret"; }); afterAll(async () => { await driver.close(); - delete process.env.NEO4J_GRAPHQL_JWT_SECRET; }); describe("create", () => { @@ -65,15 +63,17 @@ describe("auth/bind", () => { } `; + const secret = "secret"; + const token = jsonwebtoken.sign( { roles: [], sub: userId, }, - process.env.NEO4J_GRAPHQL_JWT_SECRET as string + secret ); - const neoSchema = new Neo4jGraphQL({ typeDefs }); + const neoSchema = new Neo4jGraphQL({ typeDefs, config: { jwt: { secret } } }); try { const socket = new Socket({ readable: true }); @@ -133,15 +133,17 @@ describe("auth/bind", () => { } `; + const secret = "secret"; + const token = jsonwebtoken.sign( { roles: [], sub: userId, }, - process.env.NEO4J_GRAPHQL_JWT_SECRET as string + secret ); - const neoSchema = new Neo4jGraphQL({ typeDefs }); + const neoSchema = new Neo4jGraphQL({ typeDefs, config: { jwt: { secret } } }); try { const socket = new Socket({ readable: true }); @@ -202,15 +204,17 @@ describe("auth/bind", () => { } `; + const secret = "secret"; + const token = jsonwebtoken.sign( { roles: [], sub: userId, }, - process.env.NEO4J_GRAPHQL_JWT_SECRET as string + secret ); - const neoSchema = new Neo4jGraphQL({ typeDefs }); + const neoSchema = new Neo4jGraphQL({ typeDefs, config: { jwt: { secret } } }); try { await session.run(` @@ -260,15 +264,17 @@ describe("auth/bind", () => { } `; + const secret = "secret"; + const token = jsonwebtoken.sign( { roles: [], sub: userId, }, - process.env.NEO4J_GRAPHQL_JWT_SECRET as string + secret ); - const neoSchema = new Neo4jGraphQL({ typeDefs }); + const neoSchema = new Neo4jGraphQL({ typeDefs, config: { jwt: { secret } } }); try { await session.run(` @@ -336,15 +342,17 @@ describe("auth/bind", () => { } `; + const secret = "secret"; + const token = jsonwebtoken.sign( { roles: [], sub: userId, }, - process.env.NEO4J_GRAPHQL_JWT_SECRET as string + secret ); - const neoSchema = new Neo4jGraphQL({ typeDefs }); + const neoSchema = new Neo4jGraphQL({ typeDefs, config: { jwt: { secret } } }); try { await session.run(` @@ -397,15 +405,17 @@ describe("auth/bind", () => { } `; + const secret = "secret"; + const token = jsonwebtoken.sign( { roles: [], sub: userId, }, - process.env.NEO4J_GRAPHQL_JWT_SECRET as string + secret ); - const neoSchema = new Neo4jGraphQL({ typeDefs }); + const neoSchema = new Neo4jGraphQL({ typeDefs, config: { jwt: { secret } } }); try { await session.run(` @@ -471,15 +481,17 @@ describe("auth/bind", () => { } `; + const secret = "secret"; + const token = jsonwebtoken.sign( { roles: [], sub: userId, }, - process.env.NEO4J_GRAPHQL_JWT_SECRET as string + secret ); - const neoSchema = new Neo4jGraphQL({ typeDefs }); + const neoSchema = new Neo4jGraphQL({ typeDefs, config: { jwt: { secret } } }); try { await session.run(` @@ -545,15 +557,17 @@ describe("auth/bind", () => { } `; + const secret = "secret"; + const token = jsonwebtoken.sign( { roles: [], sub: userId, }, - process.env.NEO4J_GRAPHQL_JWT_SECRET as string + secret ); - const neoSchema = new Neo4jGraphQL({ typeDefs }); + const neoSchema = new Neo4jGraphQL({ typeDefs, config: { jwt: { secret } } }); try { await session.run(` diff --git a/packages/graphql/tests/integration/auth/custom-resolvers.int.test.ts b/packages/graphql/tests/integration/auth/custom-resolvers.int.test.ts index 4c83a84697..419a727d31 100644 --- a/packages/graphql/tests/integration/auth/custom-resolvers.int.test.ts +++ b/packages/graphql/tests/integration/auth/custom-resolvers.int.test.ts @@ -31,12 +31,10 @@ describe("auth/custom-resolvers", () => { beforeAll(async () => { driver = await neo4j(); - process.env.NEO4J_GRAPHQL_JWT_SECRET = "secret"; }); afterAll(async () => { await driver.close(); - delete process.env.NEO4J_GRAPHQL_JWT_SECRET; }); describe("auth-injection", () => { @@ -63,12 +61,14 @@ describe("auth/custom-resolvers", () => { } `; + const secret = "secret"; + const token = jsonwebtoken.sign( { roles: [], sub: userId, }, - process.env.NEO4J_GRAPHQL_JWT_SECRET as string + secret ); const neoSchema = new Neo4jGraphQL({ @@ -78,6 +78,7 @@ describe("auth/custom-resolvers", () => { me: (_, __, ctx) => ({ id: ctx.auth.jwt.sub }), }, }, + config: { jwt: { secret } }, }); const socket = new Socket({ readable: true }); @@ -117,17 +118,20 @@ describe("auth/custom-resolvers", () => { } `; + const secret = "secret"; + const token = jsonwebtoken.sign( { roles: [], sub: userId, }, - process.env.NEO4J_GRAPHQL_JWT_SECRET as string + secret ); const neoSchema = new Neo4jGraphQL({ typeDefs, resolvers: { Mutation: { me: (_, __, ctx) => ({ id: ctx.auth.jwt.sub }) } }, + config: { jwt: { secret } }, }); const socket = new Socket({ readable: true }); @@ -167,12 +171,14 @@ describe("auth/custom-resolvers", () => { } `; + const secret = "secret"; + const token = jsonwebtoken.sign( { roles: [], sub: userId, }, - process.env.NEO4J_GRAPHQL_JWT_SECRET as string + secret ); const neoSchema = new Neo4jGraphQL({ @@ -181,6 +187,11 @@ describe("auth/custom-resolvers", () => { Query: { me: () => ({}) }, User: { customId: (_, __, ctx) => ctx.auth.jwt.sub }, }, + config: { + jwt: { + secret, + }, + }, }); const socket = new Socket({ readable: true }); diff --git a/packages/graphql/tests/integration/auth/is-authenticated.int.test.ts b/packages/graphql/tests/integration/auth/is-authenticated.int.test.ts index 5b81a7c189..c4466d4737 100644 --- a/packages/graphql/tests/integration/auth/is-authenticated.int.test.ts +++ b/packages/graphql/tests/integration/auth/is-authenticated.int.test.ts @@ -30,12 +30,10 @@ describe("auth/is-authenticated", () => { beforeAll(async () => { driver = await neo4j(); - process.env.NEO4J_GRAPHQL_JWT_SECRET = "secret"; }); afterAll(async () => { await driver.close(); - delete process.env.NEO4J_GRAPHQL_JWT_SECRET; }); describe("read", () => { @@ -52,7 +50,7 @@ describe("auth/is-authenticated", () => { } `; - const neoSchema = new Neo4jGraphQL({ typeDefs }); + const neoSchema = new Neo4jGraphQL({ typeDefs, config: { jwt: { secret: "secret" } } }); const query = ` { @@ -91,7 +89,7 @@ describe("auth/is-authenticated", () => { } `; - const neoSchema = new Neo4jGraphQL({ typeDefs }); + const neoSchema = new Neo4jGraphQL({ typeDefs, config: { jwt: { secret: "secret" } } }); const query = ` { @@ -135,7 +133,7 @@ describe("auth/is-authenticated", () => { } `; - const neoSchema = new Neo4jGraphQL({ typeDefs }); + const neoSchema = new Neo4jGraphQL({ typeDefs, config: { jwt: { secret: "secret" } } }); const query = ` mutation { @@ -179,7 +177,7 @@ describe("auth/is-authenticated", () => { } `; - const neoSchema = new Neo4jGraphQL({ typeDefs }); + const neoSchema = new Neo4jGraphQL({ typeDefs, config: { jwt: { secret: "secret" } } }); const query = ` mutation { @@ -225,7 +223,7 @@ describe("auth/is-authenticated", () => { } `; - const neoSchema = new Neo4jGraphQL({ typeDefs }); + const neoSchema = new Neo4jGraphQL({ typeDefs, config: { jwt: { secret: "secret" } } }); const query = ` mutation { @@ -269,7 +267,7 @@ describe("auth/is-authenticated", () => { } `; - const neoSchema = new Neo4jGraphQL({ typeDefs }); + const neoSchema = new Neo4jGraphQL({ typeDefs, config: { jwt: { secret: "secret" } } }); const query = ` mutation { @@ -339,7 +337,7 @@ describe("auth/is-authenticated", () => { charset: "alphabetic", }); - const neoSchema = new Neo4jGraphQL({ typeDefs }); + const neoSchema = new Neo4jGraphQL({ typeDefs, config: { jwt: { secret: "secret" } } }); const query = ` mutation { @@ -415,7 +413,7 @@ describe("auth/is-authenticated", () => { charset: "alphabetic", }); - const neoSchema = new Neo4jGraphQL({ typeDefs }); + const neoSchema = new Neo4jGraphQL({ typeDefs, config: { jwt: { secret: "secret" } } }); const query = ` mutation { @@ -467,7 +465,7 @@ describe("auth/is-authenticated", () => { } `; - const neoSchema = new Neo4jGraphQL({ typeDefs }); + const neoSchema = new Neo4jGraphQL({ typeDefs, config: { jwt: { secret: "secret" } } }); const query = ` mutation { @@ -515,7 +513,7 @@ describe("auth/is-authenticated", () => { } `; - const neoSchema = new Neo4jGraphQL({ typeDefs }); + const neoSchema = new Neo4jGraphQL({ typeDefs, config: { jwt: { secret: "secret" } } }); const userId = generate({ charset: "alphabetic", @@ -572,7 +570,7 @@ describe("auth/is-authenticated", () => { } `; - const neoSchema = new Neo4jGraphQL({ typeDefs }); + const neoSchema = new Neo4jGraphQL({ typeDefs, config: { jwt: { secret: "secret" } } }); const query = ` query { @@ -615,7 +613,7 @@ describe("auth/is-authenticated", () => { } `; - const neoSchema = new Neo4jGraphQL({ typeDefs }); + const neoSchema = new Neo4jGraphQL({ typeDefs, config: { jwt: { secret: "secret" } } }); const query = ` mutation { @@ -660,7 +658,7 @@ describe("auth/is-authenticated", () => { } `; - const neoSchema = new Neo4jGraphQL({ typeDefs }); + const neoSchema = new Neo4jGraphQL({ typeDefs, config: { jwt: { secret: "secret" } } }); const query = ` { diff --git a/packages/graphql/tests/integration/auth/object-path.int.test.ts b/packages/graphql/tests/integration/auth/object-path.int.test.ts index 58aa3dec06..133a67359a 100644 --- a/packages/graphql/tests/integration/auth/object-path.int.test.ts +++ b/packages/graphql/tests/integration/auth/object-path.int.test.ts @@ -31,12 +31,10 @@ describe("auth/object-path", () => { beforeAll(async () => { driver = await neo4j(); - process.env.NEO4J_GRAPHQL_JWT_SECRET = "secret"; }); afterAll(async () => { await driver.close(); - delete process.env.NEO4J_GRAPHQL_JWT_SECRET; }); test("should use object path with allow", async () => { @@ -62,6 +60,8 @@ describe("auth/object-path", () => { } `; + const secret = "secret"; + const token = jsonwebtoken.sign( { roles: [], @@ -73,10 +73,10 @@ describe("auth/object-path", () => { }, }, }, - process.env.NEO4J_GRAPHQL_JWT_SECRET as string + secret ); - const neoSchema = new Neo4jGraphQL({ typeDefs }); + const neoSchema = new Neo4jGraphQL({ typeDefs, config: { jwt: { secret } } }); try { await session.run(` @@ -134,14 +134,16 @@ describe("auth/object-path", () => { } `; + const secret = "secret"; + const token = jsonwebtoken.sign( { roles: [], }, - process.env.NEO4J_GRAPHQL_JWT_SECRET as string + secret ); - const neoSchema = new Neo4jGraphQL({ typeDefs }); + const neoSchema = new Neo4jGraphQL({ typeDefs, config: { jwt: { secret } } }); try { await session.run(` @@ -168,9 +170,6 @@ describe("auth/object-path", () => { }); test("should use object path with roles", async () => { - process.env.NEO4J_GRAPHQL_JWT_ROLES_OBJECT_PATH = - "https://github\\.com/claims.https://github\\.com/claims/roles"; - const session = driver.session({ defaultAccessMode: "WRITE" }); const typeDefs = ` @@ -193,12 +192,19 @@ describe("auth/object-path", () => { } `; + const secret = "secret"; + const token = jsonwebtoken.sign( { "https://github.com/claims": { "https://github.com/claims/roles": ["admin"] } }, - process.env.NEO4J_GRAPHQL_JWT_SECRET as string + secret ); - const neoSchema = new Neo4jGraphQL({ typeDefs }); + const neoSchema = new Neo4jGraphQL({ + typeDefs, + config: { + jwt: { secret, rolesPath: "https://github\\.com/claims.https://github\\.com/claims/roles" }, + }, + }); try { await session.run(` @@ -221,7 +227,6 @@ describe("auth/object-path", () => { expect(user).toEqual({ id: userId }); } finally { await session.close(); - delete process.env.NEO4J_GRAPHQL_JWT_ROLES_OBJECT_PATH; } }); }); diff --git a/packages/graphql/tests/integration/auth/roles.int.test.ts b/packages/graphql/tests/integration/auth/roles.int.test.ts index 565b02efe5..4ffcbe896d 100644 --- a/packages/graphql/tests/integration/auth/roles.int.test.ts +++ b/packages/graphql/tests/integration/auth/roles.int.test.ts @@ -31,12 +31,10 @@ describe("auth/roles", () => { beforeAll(async () => { driver = await neo4j(); - process.env.NEO4J_GRAPHQL_JWT_SECRET = "secret"; }); afterAll(async () => { await driver.close(); - delete process.env.NEO4J_GRAPHQL_JWT_SECRET; }); describe("read", () => { @@ -53,17 +51,17 @@ describe("auth/roles", () => { } `; - const neoSchema = new Neo4jGraphQL({ typeDefs }); - const query = ` - { - products { - id - } + { + products { + id } + } `; - const token = jsonwebtoken.sign({ roles: [] }, process.env.NEO4J_GRAPHQL_JWT_SECRET as string); + const secret = "secret"; + const token = jsonwebtoken.sign({ roles: [] }, secret); + const neoSchema = new Neo4jGraphQL({ typeDefs, config: { jwt: { secret } } }); try { const socket = new Socket({ readable: true }); @@ -92,8 +90,6 @@ describe("auth/roles", () => { } `; - const neoSchema = new Neo4jGraphQL({ typeDefs }); - const query = ` { users { @@ -102,7 +98,9 @@ describe("auth/roles", () => { } `; - const token = jsonwebtoken.sign({ roles: [] }, process.env.NEO4J_GRAPHQL_JWT_SECRET as string); + const secret = "secret"; + const token = jsonwebtoken.sign({ roles: [] }, secret); + const neoSchema = new Neo4jGraphQL({ typeDefs, config: { jwt: { secret } } }); try { const socket = new Socket({ readable: true }); @@ -136,8 +134,6 @@ describe("auth/roles", () => { } `; - const neoSchema = new Neo4jGraphQL({ typeDefs }); - const query = ` mutation { createUsers(input: [{ id: "1" }]) { @@ -148,7 +144,9 @@ describe("auth/roles", () => { } `; - const token = jsonwebtoken.sign({ roles: [] }, process.env.NEO4J_GRAPHQL_JWT_SECRET as string); + const secret = "secret"; + const token = jsonwebtoken.sign({ roles: [] }, secret); + const neoSchema = new Neo4jGraphQL({ typeDefs, config: { jwt: { secret } } }); try { const socket = new Socket({ readable: true }); @@ -180,8 +178,6 @@ describe("auth/roles", () => { } `; - const neoSchema = new Neo4jGraphQL({ typeDefs }); - const query = ` mutation { createUsers(input: [{ password: "1" }]) { @@ -192,7 +188,9 @@ describe("auth/roles", () => { } `; - const token = jsonwebtoken.sign({ roles: [] }, process.env.NEO4J_GRAPHQL_JWT_SECRET as string); + const secret = "secret"; + const token = jsonwebtoken.sign({ roles: [] }, secret); + const neoSchema = new Neo4jGraphQL({ typeDefs, config: { jwt: { secret } } }); try { const socket = new Socket({ readable: true }); @@ -226,8 +224,6 @@ describe("auth/roles", () => { } `; - const neoSchema = new Neo4jGraphQL({ typeDefs }); - const query = ` mutation { updateUsers(update: { id: "1" }) { @@ -238,7 +234,9 @@ describe("auth/roles", () => { } `; - const token = jsonwebtoken.sign({ roles: [] }, process.env.NEO4J_GRAPHQL_JWT_SECRET as string); + const secret = "secret"; + const token = jsonwebtoken.sign({ roles: [] }, secret); + const neoSchema = new Neo4jGraphQL({ typeDefs, config: { jwt: { secret } } }); try { const socket = new Socket({ readable: true }); @@ -270,8 +268,6 @@ describe("auth/roles", () => { } `; - const neoSchema = new Neo4jGraphQL({ typeDefs }); - const query = ` mutation { updateUsers(update: { password: "1" }) { @@ -282,7 +278,9 @@ describe("auth/roles", () => { } `; - const token = jsonwebtoken.sign({ roles: [] }, process.env.NEO4J_GRAPHQL_JWT_SECRET as string); + const secret = "secret"; + const token = jsonwebtoken.sign({ roles: [] }, secret); + const neoSchema = new Neo4jGraphQL({ typeDefs, config: { jwt: { secret } } }); try { const socket = new Socket({ readable: true }); @@ -340,8 +338,6 @@ describe("auth/roles", () => { charset: "alphabetic", }); - const neoSchema = new Neo4jGraphQL({ typeDefs }); - const query = ` mutation { updateUsers(update: { id: "${userId}" }, connect: { posts: { where: { id: "${postId}" } } }) { @@ -352,8 +348,10 @@ describe("auth/roles", () => { } `; + const secret = "secret"; // missing super-admin - const token = jsonwebtoken.sign({ roles: ["admin"] }, process.env.NEO4J_GRAPHQL_JWT_SECRET as string); + const token = jsonwebtoken.sign({ roles: ["admin"] }, secret); + const neoSchema = new Neo4jGraphQL({ typeDefs, config: { jwt: { secret } } }); try { await session.run(` @@ -423,8 +421,6 @@ describe("auth/roles", () => { charset: "alphabetic", }); - const neoSchema = new Neo4jGraphQL({ typeDefs }); - const query = ` mutation { updateComments( @@ -444,7 +440,9 @@ describe("auth/roles", () => { } `; - const token = jsonwebtoken.sign({ roles: [""] }, process.env.NEO4J_GRAPHQL_JWT_SECRET as string); + const secret = "secret"; + const token = jsonwebtoken.sign({ roles: [""] }, secret); + const neoSchema = new Neo4jGraphQL({ typeDefs, config: { jwt: { secret } } }); try { await session.run(` @@ -507,8 +505,6 @@ describe("auth/roles", () => { charset: "alphabetic", }); - const neoSchema = new Neo4jGraphQL({ typeDefs }); - const query = ` mutation { updateUsers(update: { id: "${userId}" }, disconnect: { posts: { where: { id: "${postId}" } } }) { @@ -519,8 +515,10 @@ describe("auth/roles", () => { } `; + const secret = "secret"; // missing super-admin - const token = jsonwebtoken.sign({ roles: ["admin"] }, process.env.NEO4J_GRAPHQL_JWT_SECRET as string); + const token = jsonwebtoken.sign({ roles: ["admin"] }, secret); + const neoSchema = new Neo4jGraphQL({ typeDefs, config: { jwt: { secret } } }); try { await session.run(` @@ -590,8 +588,6 @@ describe("auth/roles", () => { charset: "alphabetic", }); - const neoSchema = new Neo4jGraphQL({ typeDefs }); - const query = ` mutation { updateComments( @@ -611,7 +607,9 @@ describe("auth/roles", () => { } `; - const token = jsonwebtoken.sign({ roles: [""] }, process.env.NEO4J_GRAPHQL_JWT_SECRET as string); + const secret = "secret"; + const token = jsonwebtoken.sign({ roles: [""] }, secret); + const neoSchema = new Neo4jGraphQL({ typeDefs, config: { jwt: { secret } } }); try { await session.run(` @@ -649,8 +647,6 @@ describe("auth/roles", () => { } `; - const neoSchema = new Neo4jGraphQL({ typeDefs }); - const query = ` mutation { deleteUsers { @@ -659,7 +655,9 @@ describe("auth/roles", () => { } `; - const token = jsonwebtoken.sign({ roles: [] }, process.env.NEO4J_GRAPHQL_JWT_SECRET as string); + const secret = "secret"; + const token = jsonwebtoken.sign({ roles: [] }, secret); + const neoSchema = new Neo4jGraphQL({ typeDefs, config: { jwt: { secret } } }); try { const socket = new Socket({ readable: true }); @@ -697,8 +695,6 @@ describe("auth/roles", () => { } `; - const neoSchema = new Neo4jGraphQL({ typeDefs }); - const userId = generate({ charset: "alphabetic", }); @@ -715,8 +711,9 @@ describe("auth/roles", () => { } `; - const token = jsonwebtoken.sign({ roles: [] }, process.env.NEO4J_GRAPHQL_JWT_SECRET as string); - + const secret = "secret"; + const token = jsonwebtoken.sign({ roles: [] }, secret); + const neoSchema = new Neo4jGraphQL({ typeDefs, config: { jwt: { secret } } }); try { await session.run(` CREATE (:User {id: "${userId}"})-[:HAS_POST]->(:Post {id: "${postId}"}) @@ -754,8 +751,6 @@ describe("auth/roles", () => { } `; - const neoSchema = new Neo4jGraphQL({ typeDefs }); - const query = ` query { users { @@ -764,7 +759,9 @@ describe("auth/roles", () => { } `; - const token = jsonwebtoken.sign({ roles: [] }, process.env.NEO4J_GRAPHQL_JWT_SECRET as string); + const secret = "secret"; + const token = jsonwebtoken.sign({ roles: [] }, secret); + const neoSchema = new Neo4jGraphQL({ typeDefs, config: { jwt: { secret } } }); try { const socket = new Socket({ readable: true }); @@ -797,8 +794,6 @@ describe("auth/roles", () => { } `; - const neoSchema = new Neo4jGraphQL({ typeDefs }); - const query = ` mutation { createUser { @@ -807,7 +802,9 @@ describe("auth/roles", () => { } `; - const token = jsonwebtoken.sign({ roles: [] }, process.env.NEO4J_GRAPHQL_JWT_SECRET as string); + const secret = "secret"; + const token = jsonwebtoken.sign({ roles: [] }, secret); + const neoSchema = new Neo4jGraphQL({ typeDefs, config: { jwt: { secret } } }); try { const socket = new Socket({ readable: true }); @@ -842,8 +839,6 @@ describe("auth/roles", () => { } `; - const neoSchema = new Neo4jGraphQL({ typeDefs }); - const query = ` { users { @@ -854,7 +849,9 @@ describe("auth/roles", () => { } `; - const token = jsonwebtoken.sign({ roles: [] }, process.env.NEO4J_GRAPHQL_JWT_SECRET as string); + const secret = "secret"; + const token = jsonwebtoken.sign({ roles: [] }, secret); + const neoSchema = new Neo4jGraphQL({ typeDefs, config: { jwt: { secret } } }); try { const socket = new Socket({ readable: true }); diff --git a/packages/graphql/tests/integration/auth/where.int.test.ts b/packages/graphql/tests/integration/auth/where.int.test.ts index 9fa99f8c6c..e6734f3b2e 100644 --- a/packages/graphql/tests/integration/auth/where.int.test.ts +++ b/packages/graphql/tests/integration/auth/where.int.test.ts @@ -31,12 +31,10 @@ describe("auth/where", () => { beforeAll(async () => { driver = await neo4j(); - process.env.NEO4J_GRAPHQL_JWT_SECRET = "secret"; }); afterAll(async () => { await driver.close(); - delete process.env.NEO4J_GRAPHQL_JWT_SECRET; }); describe("read", () => { @@ -63,15 +61,17 @@ describe("auth/where", () => { } `; + const secret = "secret"; + const token = jsonwebtoken.sign( { roles: [], sub: userId, }, - process.env.NEO4J_GRAPHQL_JWT_SECRET as string + secret ); - const neoSchema = new Neo4jGraphQL({ typeDefs }); + const neoSchema = new Neo4jGraphQL({ typeDefs, config: { jwt: { secret } } }); try { await session.run(` @@ -133,15 +133,17 @@ describe("auth/where", () => { } `; + const secret = "secret"; + const token = jsonwebtoken.sign( { roles: [], sub: userId, }, - process.env.NEO4J_GRAPHQL_JWT_SECRET as string + secret ); - const neoSchema = new Neo4jGraphQL({ typeDefs }); + const neoSchema = new Neo4jGraphQL({ typeDefs, config: { jwt: { secret } } }); try { await session.run(` @@ -219,15 +221,17 @@ describe("auth/where", () => { } `; + const secret = "secret"; + const token = jsonwebtoken.sign( { roles: [], sub: userId, }, - process.env.NEO4J_GRAPHQL_JWT_SECRET as string + secret ); - const neoSchema = new Neo4jGraphQL({ typeDefs }); + const neoSchema = new Neo4jGraphQL({ typeDefs, config: { jwt: { secret } } }); try { await session.run(` @@ -290,15 +294,17 @@ describe("auth/where", () => { } `; + const secret = "secret"; + const token = jsonwebtoken.sign( { roles: [], sub: userId, }, - process.env.NEO4J_GRAPHQL_JWT_SECRET as string + secret ); - const neoSchema = new Neo4jGraphQL({ typeDefs }); + const neoSchema = new Neo4jGraphQL({ typeDefs, config: { jwt: { secret } } }); try { await session.run(` @@ -349,15 +355,17 @@ describe("auth/where", () => { } `; + const secret = "secret"; + const token = jsonwebtoken.sign( { roles: [], sub: userId, }, - process.env.NEO4J_GRAPHQL_JWT_SECRET as string + secret ); - const neoSchema = new Neo4jGraphQL({ typeDefs }); + const neoSchema = new Neo4jGraphQL({ typeDefs, config: { jwt: { secret } } }); try { await session.run(` @@ -427,15 +435,17 @@ describe("auth/where", () => { } `; + const secret = "secret"; + const token = jsonwebtoken.sign( { roles: [], sub: userId, }, - process.env.NEO4J_GRAPHQL_JWT_SECRET as string + secret ); - const neoSchema = new Neo4jGraphQL({ typeDefs }); + const neoSchema = new Neo4jGraphQL({ typeDefs, config: { jwt: { secret } } }); try { await session.run(` @@ -498,15 +508,17 @@ describe("auth/where", () => { } `; + const secret = "secret"; + const token = jsonwebtoken.sign( { roles: [], sub: userId, }, - process.env.NEO4J_GRAPHQL_JWT_SECRET as string + secret ); - const neoSchema = new Neo4jGraphQL({ typeDefs }); + const neoSchema = new Neo4jGraphQL({ typeDefs, config: { jwt: { secret } } }); try { await session.run(` @@ -571,15 +583,17 @@ describe("auth/where", () => { } `; + const secret = "secret"; + const token = jsonwebtoken.sign( { roles: [], sub: userId, }, - process.env.NEO4J_GRAPHQL_JWT_SECRET as string + secret ); - const neoSchema = new Neo4jGraphQL({ typeDefs }); + const neoSchema = new Neo4jGraphQL({ typeDefs, config: { jwt: { secret } } }); try { await session.run(` @@ -641,15 +655,17 @@ describe("auth/where", () => { } `; + const secret = "secret"; + const token = jsonwebtoken.sign( { roles: [], sub: userId, }, - process.env.NEO4J_GRAPHQL_JWT_SECRET as string + secret ); - const neoSchema = new Neo4jGraphQL({ typeDefs }); + const neoSchema = new Neo4jGraphQL({ typeDefs, config: { jwt: { secret } } }); try { await session.run(` diff --git a/packages/graphql/tests/integration/custom-directives.int.test.ts b/packages/graphql/tests/integration/custom-directives.int.test.ts new file mode 100644 index 0000000000..8eeb6b2847 --- /dev/null +++ b/packages/graphql/tests/integration/custom-directives.int.test.ts @@ -0,0 +1,99 @@ +/* + * Copyright (c) "Neo4j" + * Neo4j Sweden AB [http://neo4j.com] + * + * This file is part of Neo4j. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { Driver } from "neo4j-driver"; +import { gql } from "apollo-server"; +import { graphql, defaultFieldResolver } from "graphql"; +import { SchemaDirectiveVisitor } from "@graphql-tools/utils"; +import { generate } from "randomstring"; +import { Neo4jGraphQL } from "../../src/classes"; +import neo4j from "./neo4j"; + +describe("Custom Directives", () => { + let driver: Driver; + + beforeAll(async () => { + driver = await neo4j(); + }); + + afterAll(async () => { + await driver.close(); + }); + + test("should define a custom schemaDirective and resolve it", async () => { + const session = driver.session(); + + class UpperCaseDirective extends SchemaDirectiveVisitor { + // eslint-disable-next-line class-methods-use-this + visitFieldDefinition(field) { + const { resolve = defaultFieldResolver } = field; + // eslint-disable-next-line no-param-reassign + field.resolve = async function r(...args) { + const result = await resolve.apply(this, args); + if (typeof result === "string") { + return result.toUpperCase(); + } + return result; + }; + } + } + + const neoSchema = new Neo4jGraphQL({ + typeDefs: gql` + directive @uppercase on FIELD_DEFINITION + + type Movie { + name: String @uppercase + } + `, + schemaDirectives: { uppercase: UpperCaseDirective }, + driver, + }); + + const name = generate({ + charset: "alphabetic", + }).toLowerCase(); + + const create = ` + mutation { + createMovies(input:[{name: "${name}"}]) { + movies { + name + } + } + } + `; + + try { + const gqlResult = await graphql({ + schema: neoSchema.schema, + source: create, + contextValue: { driver }, + }); + + expect(gqlResult.errors).toBeFalsy(); + + expect((gqlResult.data as any).createMovies.movies[0]).toEqual({ + name: name.toUpperCase(), + }); + } finally { + await session.close(); + } + }); +}); diff --git a/packages/graphql/tests/integration/custom-resolvers-int.test.ts b/packages/graphql/tests/integration/custom-resolvers-int.test.ts index f16ccceeb6..3236c2f0c7 100644 --- a/packages/graphql/tests/integration/custom-resolvers-int.test.ts +++ b/packages/graphql/tests/integration/custom-resolvers-int.test.ts @@ -32,12 +32,10 @@ describe("Custom Resolvers", () => { beforeAll(async () => { driver = await neo4j(); - process.env.NEO4J_GRAPHQL_JWT_SECRET = "secret"; }); afterAll(async () => { await driver.close(); - delete process.env.NEO4J_GRAPHQL_JWT_SECRET; }); test("should define a custom field resolver and resolve it", async () => { @@ -455,9 +453,11 @@ describe("Custom Resolvers", () => { charset: "alphabetic", }); - const token = jsonwebtoken.sign({ sub: userId }, process.env.NEO4J_GRAPHQL_JWT_SECRET as string); + const secret = "secret"; - const neoSchema = new Neo4jGraphQL({ typeDefs }); + const token = jsonwebtoken.sign({ sub: userId }, secret); + + const neoSchema = new Neo4jGraphQL({ typeDefs, config: { jwt: { secret } } }); const query = ` { @@ -503,9 +503,11 @@ describe("Custom Resolvers", () => { charset: "alphabetic", }); - const token = jsonwebtoken.sign({ sub: userId }, process.env.NEO4J_GRAPHQL_JWT_SECRET as string); + const secret = "secret"; + + const token = jsonwebtoken.sign({ sub: userId }, secret); - const neoSchema = new Neo4jGraphQL({ typeDefs }); + const neoSchema = new Neo4jGraphQL({ typeDefs, config: { jwt: { secret } } }); const query = ` mutation { @@ -550,9 +552,11 @@ describe("Custom Resolvers", () => { charset: "alphabetic", }); - const token = jsonwebtoken.sign({ sub: userId }, process.env.NEO4J_GRAPHQL_JWT_SECRET as string); + const secret = "secret"; + + const token = jsonwebtoken.sign({ sub: userId }, secret); - const neoSchema = new Neo4jGraphQL({ typeDefs }); + const neoSchema = new Neo4jGraphQL({ typeDefs, config: { jwt: { secret } } }); const query = ` { diff --git a/packages/graphql/tests/integration/default-values.int.test.ts b/packages/graphql/tests/integration/default-values.int.test.ts index de341f103d..f0deaa9b7e 100644 --- a/packages/graphql/tests/integration/default-values.int.test.ts +++ b/packages/graphql/tests/integration/default-values.int.test.ts @@ -30,12 +30,10 @@ describe("Default values", () => { beforeAll(async () => { driver = await neo4j(); - process.env.NEO4J_GRAPHQL_JWT_SECRET = "secret"; }); afterAll(async () => { await driver.close(); - delete process.env.NEO4J_GRAPHQL_JWT_SECRET; }); test("should allow default value on custom @cypher node field", async () => { diff --git a/packages/graphql/tests/integration/multi-database.int.test.ts b/packages/graphql/tests/integration/multi-database.int.test.ts index 4fef88bc90..1ba9817424 100644 --- a/packages/graphql/tests/integration/multi-database.int.test.ts +++ b/packages/graphql/tests/integration/multi-database.int.test.ts @@ -79,7 +79,11 @@ describe("multi-database", () => { } `; - const neoSchema = new Neo4jGraphQL({ typeDefs, driver, driverConfig: { database: "another-random-db" } }); + const neoSchema = new Neo4jGraphQL({ + typeDefs, + driver, + config: { driverConfig: { database: "another-random-db" } }, + }); const id = generate({ charset: "alphabetic", diff --git a/packages/graphql/tests/tck/tck.test.ts b/packages/graphql/tests/tck/tck.test.ts index 76b944d692..c5ea50a1d6 100644 --- a/packages/graphql/tests/tck/tck.test.ts +++ b/packages/graphql/tests/tck/tck.test.ts @@ -53,13 +53,7 @@ import createAuthParam from "../../src/translate/create-auth-param"; const TCK_DIR = path.join(__dirname, "tck-test-files"); -beforeAll(() => { - process.env.NEO4J_GRAPHQL_JWT_SECRET = "secret"; -}); - -afterAll(() => { - delete process.env.NEO4J_GRAPHQL_JWT_SECRET; -}); +const secret = "secret"; function generateCustomScalar(name: string): GraphQLScalarType { return new GraphQLScalarType({ @@ -85,9 +79,13 @@ describe("TCK Generated tests", () => { setTestEnvVars(envVars); if (kind === "cypher") { const document = parse(schema as string); - // @ts-ignore - const neoSchema = new Neo4jGraphQL({ typeDefs: schema as string, driver: {} }); + const neoSchema = new Neo4jGraphQL({ + typeDefs: schema as string, + // @ts-ignore + driver: {}, + config: { enableRegex: true, jwt: { secret } }, + }); // @ts-ignore test.each(tests.map((t) => [t.name, t]))("%s", async (_, obj) => { @@ -102,7 +100,7 @@ describe("TCK Generated tests", () => { if (!cypherParams.jwt) { const socket = new Socket({ readable: true }); const req = new IncomingMessage(socket); - const token = jsonwebtoken.sign(jwt, process.env.NEO4J_GRAPHQL_JWT_SECRET as string, { + const token = jsonwebtoken.sign(jwt, secret, { noTimestamp: true, }); req.headers.authorization = `Bearer ${token}`; @@ -146,8 +144,6 @@ describe("TCK Generated tests", () => { context.neoSchema = neoSchema; context.resolveTree = resolveTree; - // @ts-ignore - context.driver = {}; const mergedContext = { ...context, ...defaultContext }; @@ -184,8 +180,6 @@ describe("TCK Generated tests", () => { context.neoSchema = neoSchema; context.resolveTree = resolveTree; - // @ts-ignore - context.driver = {}; const mergedContext = { ...context, ...defaultContext }; @@ -214,8 +208,6 @@ describe("TCK Generated tests", () => { context.neoSchema = neoSchema; context.resolveTree = resolveTree; - // @ts-ignore - context.driver = {}; const mergedContext = { ...context, ...defaultContext }; @@ -239,8 +231,6 @@ describe("TCK Generated tests", () => { context.neoSchema = neoSchema; context.resolveTree = resolveTree; - // @ts-ignore - context.driver = {}; const mergedContext = { ...context, ...defaultContext }; @@ -300,10 +290,12 @@ describe("TCK Generated tests", () => { ...customScalars, schemaDirectives: directives, }), - // @ts-ignore - driver: {}, - // @ts-ignore - driverConfig: {}, + config: { + // @ts-ignore + driver: {}, + // @ts-ignore + driverConfig: {}, + }, }); const result = await graphql(executableSchema, graphQlQuery, null, defaultContext, graphQlParams); diff --git a/packages/ogm/package.json b/packages/ogm/package.json index 24e674db53..9aa0b39f38 100644 --- a/packages/ogm/package.json +++ b/packages/ogm/package.json @@ -47,6 +47,7 @@ "graphql-tag": "2.11.0", "jest": "26.2.2", "libnpmsearch": "3.1.0", + "neo4j-driver": "4.2.0", "npm-run-all": "^4.1.5", "randomstring": "1.1.5", "semver": "7.3.5", diff --git a/packages/ogm/src/classes/OGM.ts b/packages/ogm/src/classes/OGM.ts index 837d513e7c..5350440441 100644 --- a/packages/ogm/src/classes/OGM.ts +++ b/packages/ogm/src/classes/OGM.ts @@ -17,28 +17,26 @@ * limitations under the License. */ -import { Driver } from "neo4j-driver"; import { Neo4jGraphQL, Neo4jGraphQLConstructor } from "@neo4j/graphql"; import Model from "./Model"; import { filterDocument } from "../utils"; +export type OGMConstructor = Neo4jGraphQLConstructor; + class OGM { public neoSchema: Neo4jGraphQL; public models: Model[]; - public input: Neo4jGraphQLConstructor; + public input: OGMConstructor; - constructor(input: Neo4jGraphQLConstructor) { + constructor(input: OGMConstructor) { this.input = input; + const { typeDefs, ...rest } = input; this.neoSchema = new Neo4jGraphQL({ - typeDefs: filterDocument(input.typeDefs), - driver: input.driver, - resolvers: input.resolvers, - schemaDirectives: input.schemaDirectives, - debug: input.debug, - driverConfig: input.driverConfig, + ...rest, + typeDefs: filterDocument(typeDefs), }); this.models = this.neoSchema.nodes.map((n) => { @@ -69,10 +67,10 @@ class OGM { return found; } - async checkNeo4jCompat(input: { driver?: Driver } = {}): Promise { - const driver = input.driver || this.input.driver; + checkNeo4jCompat(): Promise { + const { driver, config: { driverConfig } = {} } = this.input; - return this.neoSchema.checkNeo4jCompat({ driver }); + return this.neoSchema.checkNeo4jCompat({ driver, driverConfig }); } } diff --git a/packages/ogm/tests/integration/ogm.int.test.ts b/packages/ogm/tests/integration/ogm.int.test.ts index 91969cffb6..93bfc952b0 100644 --- a/packages/ogm/tests/integration/ogm.int.test.ts +++ b/packages/ogm/tests/integration/ogm.int.test.ts @@ -43,7 +43,7 @@ describe("OGM", () => { } `; - const ogm = new OGM({ typeDefs, driver, driverConfig: { database: "another-random-db" } }); + const ogm = new OGM({ typeDefs, driver, config: { driverConfig: { database: "another-random-db" } } }); await expect(ogm.model("Movie")?.find()).rejects.toThrow(); diff --git a/yarn.lock b/yarn.lock index 45844cfba3..67c3d80775 100644 --- a/yarn.lock +++ b/yarn.lock @@ -6,20 +6,20 @@ __metadata: cacheKey: 7 "@apollo/client@npm:latest": - version: 3.3.12 - resolution: "@apollo/client@npm:3.3.12" + version: 3.3.15 + resolution: "@apollo/client@npm:3.3.15" dependencies: "@graphql-typed-document-node/core": ^3.0.0 "@types/zen-observable": ^0.8.0 - "@wry/context": ^0.5.2 - "@wry/equality": ^0.3.0 + "@wry/context": ^0.6.0 + "@wry/equality": ^0.4.0 fast-json-stable-stringify: ^2.0.0 graphql-tag: ^2.12.0 hoist-non-react-statics: ^3.3.2 - optimism: ^0.14.0 + optimism: ^0.15.0 prop-types: ^15.7.2 symbol-observable: ^2.0.0 - ts-invariant: ^0.6.2 + ts-invariant: ^0.7.0 tslib: ^1.10.0 zen-observable: ^0.8.14 peerDependencies: @@ -31,7 +31,7 @@ __metadata: optional: true subscriptions-transport-ws: optional: true - checksum: 18181dc9794b61b6ef314f15a07ffbebac9353bcd4715fc2ab2abd0a287bcc45c6a94aa6f23ddf2a2967b73435cfbcca721411e893a7874903eed07c308046e7 + checksum: 400329207c58067b428480fcd212d62a0ef17e21c37d9dab69a8b3999e2bf5c093cd446570a9fe42ff7b3eae9ae99316415775a5a234657401c5ae21bc15b038 languageName: node linkType: hard @@ -130,59 +130,58 @@ __metadata: languageName: node linkType: hard -"@babel/compat-data@npm:^7.13.8": - version: 7.13.12 - resolution: "@babel/compat-data@npm:7.13.12" - checksum: a7165243d68ee4d3f22cddd431175678df9c01dc12c11621ba8a76af9907d922d68afaa9f32a05ce2b85e55895dd8ca5c9407a8ec72ffcda12400ca24714d15a +"@babel/compat-data@npm:^7.13.15": + version: 7.13.15 + resolution: "@babel/compat-data@npm:7.13.15" + checksum: 6abe95cbd36e54217cdcc51829e377cf31451ed0a64ff43cc82e0ce728d9e265990c5e079d5c3f9ee0afd49e20d6c90112fe2093ed0699c2ffc62f5172df24fa languageName: node linkType: hard -"@babel/core@npm:7.13.10, @babel/core@npm:^7.1.0, @babel/core@npm:^7.7.5": - version: 7.13.10 - resolution: "@babel/core@npm:7.13.10" +"@babel/core@npm:7.13.16, @babel/core@npm:^7.1.0, @babel/core@npm:^7.7.5": + version: 7.13.16 + resolution: "@babel/core@npm:7.13.16" dependencies: "@babel/code-frame": ^7.12.13 - "@babel/generator": ^7.13.9 - "@babel/helper-compilation-targets": ^7.13.10 - "@babel/helper-module-transforms": ^7.13.0 - "@babel/helpers": ^7.13.10 - "@babel/parser": ^7.13.10 + "@babel/generator": ^7.13.16 + "@babel/helper-compilation-targets": ^7.13.16 + "@babel/helper-module-transforms": ^7.13.14 + "@babel/helpers": ^7.13.16 + "@babel/parser": ^7.13.16 "@babel/template": ^7.12.13 - "@babel/traverse": ^7.13.0 - "@babel/types": ^7.13.0 + "@babel/traverse": ^7.13.15 + "@babel/types": ^7.13.16 convert-source-map: ^1.7.0 debug: ^4.1.0 gensync: ^1.0.0-beta.2 json5: ^2.1.2 - lodash: ^4.17.19 semver: ^6.3.0 source-map: ^0.5.0 - checksum: 728249a0bae293547d987e4d9886a14dda663d8cb629eb59c9d9ad3ee455048c2ccc3858c82305229ad4a415c2f39579abaa3982b653d40de348c39a3beb5e4d + checksum: 1a53b70629fae3c5b714af1c582a92ffbb1a87d0f8fe705292faed6281476bf0a35ffa19d9d28ad791610d203fdbb8928e28aedb52a02023a561caaa44a9ee61 languageName: node linkType: hard -"@babel/generator@npm:^7.13.0, @babel/generator@npm:^7.13.9": - version: 7.13.9 - resolution: "@babel/generator@npm:7.13.9" +"@babel/generator@npm:^7.13.16, @babel/generator@npm:^7.13.9": + version: 7.13.16 + resolution: "@babel/generator@npm:7.13.16" dependencies: - "@babel/types": ^7.13.0 + "@babel/types": ^7.13.16 jsesc: ^2.5.1 source-map: ^0.5.0 - checksum: d9cf7db910dd703a55c3ba147a8024564d51de06f5e3e61aef6ca197bcd80a6cb0a633fe4688c8c9f6226c70ee6f32a747050a8e420972b45cc98a6b3fc5ae66 + checksum: 299bf875ea550f52d157260804bf5b1acdc27269ae7287e53a1a5a602ff6052a466f4a4c03dc7377b3f2d5240eea5ee92162e2a943acb4d28e017ac89ab89e9d languageName: node linkType: hard -"@babel/helper-compilation-targets@npm:^7.13.10": - version: 7.13.10 - resolution: "@babel/helper-compilation-targets@npm:7.13.10" +"@babel/helper-compilation-targets@npm:^7.13.16": + version: 7.13.16 + resolution: "@babel/helper-compilation-targets@npm:7.13.16" dependencies: - "@babel/compat-data": ^7.13.8 + "@babel/compat-data": ^7.13.15 "@babel/helper-validator-option": ^7.12.17 browserslist: ^4.14.5 semver: ^6.3.0 peerDependencies: "@babel/core": ^7.0.0 - checksum: 80eb7a380d01d785de42006370e13bbda63b76745a8da1c68dcbf3dc4bff630bd9db8a76cf3053628c61d91c1452328a4ad9a8d9fc24ed65c02f635327234678 + checksum: baa1e4cdd562996c6af0a8cedb097cd72f67c44577faf4b657015f477d4930ebcc40ca21dc1e5fcffe91a1517de6e4114bc21f805ca701dfac2ddd2e9b006228 languageName: node linkType: hard @@ -224,9 +223,9 @@ __metadata: languageName: node linkType: hard -"@babel/helper-module-transforms@npm:^7.13.0": - version: 7.13.12 - resolution: "@babel/helper-module-transforms@npm:7.13.12" +"@babel/helper-module-transforms@npm:^7.13.14": + version: 7.13.14 + resolution: "@babel/helper-module-transforms@npm:7.13.14" dependencies: "@babel/helper-module-imports": ^7.13.12 "@babel/helper-replace-supers": ^7.13.12 @@ -234,9 +233,9 @@ __metadata: "@babel/helper-split-export-declaration": ^7.12.13 "@babel/helper-validator-identifier": ^7.12.11 "@babel/template": ^7.12.13 - "@babel/traverse": ^7.13.0 - "@babel/types": ^7.13.12 - checksum: d2f9bb7a62685c54570b5e78a567d2a75748e55eca70bd11924b3a15c50017864dbe37697952889e17e1c1764e99fe28e9ca1959e014e57e56f73cc09f0a2e19 + "@babel/traverse": ^7.13.13 + "@babel/types": ^7.13.14 + checksum: 576e86d0d41674e01703754a16e94495e424c7972f932e1eedb30206092b410b3659c0d0a7a06c61e024cee9b6020215db4732903ae49ebbd19d813feb0a90da languageName: node linkType: hard @@ -300,14 +299,14 @@ __metadata: languageName: node linkType: hard -"@babel/helpers@npm:^7.13.10": - version: 7.13.10 - resolution: "@babel/helpers@npm:7.13.10" +"@babel/helpers@npm:^7.13.16": + version: 7.13.16 + resolution: "@babel/helpers@npm:7.13.16" dependencies: "@babel/template": ^7.12.13 - "@babel/traverse": ^7.13.0 - "@babel/types": ^7.13.0 - checksum: 1bc93126957b51108080ab1aa24997a9a10d5f395de54621ce9df7825cdbce878ad9d26886c927c3d9bcfd75d24972037ed5fb904fcd83fb92e5c8f8628f6b40 + "@babel/traverse": ^7.13.15 + "@babel/types": ^7.13.16 + checksum: 8e3e8cdb2d996956843e8539b635711ddbf547eb6e65fc6a168b4c7ee7c548d0954bfd5859f5d644f6ce5116d6c4953051aca617a1e32f7224ceefbcaa30045f languageName: node linkType: hard @@ -322,12 +321,12 @@ __metadata: languageName: node linkType: hard -"@babel/parser@npm:^7.1.0, @babel/parser@npm:^7.12.13, @babel/parser@npm:^7.13.0, @babel/parser@npm:^7.13.10": - version: 7.13.12 - resolution: "@babel/parser@npm:7.13.12" +"@babel/parser@npm:^7.1.0, @babel/parser@npm:^7.12.13, @babel/parser@npm:^7.13.15, @babel/parser@npm:^7.13.16": + version: 7.13.16 + resolution: "@babel/parser@npm:7.13.16" bin: parser: ./bin/babel-parser.js - checksum: d73d8fa55627697501e3f86b84a6f91edd93695347bb7aa02e7466ddc7e39fc79dc1b43a496c6a253d7a8608f8cfcf420692d2f88ff2ca668f8273742b804430 + checksum: 4f02b226686ad98684128d64082388c8af3a2cd0bb986e8eb0339235d99f9a6bb55ba225da953291d975f341fe6d5d5dc006706d515f999be5ad49dd99f815e3 languageName: node linkType: hard @@ -464,21 +463,21 @@ __metadata: linkType: hard "@babel/runtime-corejs3@npm:^7.10.2": - version: 7.13.10 - resolution: "@babel/runtime-corejs3@npm:7.13.10" + version: 7.13.16 + resolution: "@babel/runtime-corejs3@npm:7.13.16" dependencies: core-js-pure: ^3.0.0 regenerator-runtime: ^0.13.4 - checksum: cbf4de5c0e73197447c112b31e1e7bb48b7940c815fdc6e8aee28a9e33f57f5c3991ba0598dfbfb8bc4d22a7cfe3b2eced0f08c12f8e618aa2ccf73684ced051 + checksum: ec3fdafe86b929ed6e603441c13023c1b964d925d71baf0a7cb991c464cfa838faa385106af04628a4bbd8c09fbbfc831ad2b607f83ef7c3bc2723f6f9e77936 languageName: node linkType: hard "@babel/runtime@npm:^7.1.2, @babel/runtime@npm:^7.10.2, @babel/runtime@npm:^7.11.2, @babel/runtime@npm:^7.12.1, @babel/runtime@npm:^7.4.2, @babel/runtime@npm:^7.5.5, @babel/runtime@npm:^7.6.3, @babel/runtime@npm:^7.8.7": - version: 7.13.10 - resolution: "@babel/runtime@npm:7.13.10" + version: 7.13.16 + resolution: "@babel/runtime@npm:7.13.16" dependencies: regenerator-runtime: ^0.13.4 - checksum: 22014226b96a8c8e8d4e8bcdb011f317d1b32881aef424a669dc6ceaee14993d3609172967853cbf9c25c724c25145d45885b6c9df56ba241c12820776607f1f + checksum: 5975f71ee999ee80d5a2f9e35a645c1d6a54acf77bcfe1ce2904e0ed3155b2f2984aafdaabd0b776dc7ba19fe6764ca4a705fa22de07df983655faa76d5927a1 languageName: node linkType: hard @@ -493,31 +492,29 @@ __metadata: languageName: node linkType: hard -"@babel/traverse@npm:^7.1.0, @babel/traverse@npm:^7.13.0": - version: 7.13.0 - resolution: "@babel/traverse@npm:7.13.0" +"@babel/traverse@npm:^7.1.0, @babel/traverse@npm:^7.13.0, @babel/traverse@npm:^7.13.13, @babel/traverse@npm:^7.13.15": + version: 7.13.15 + resolution: "@babel/traverse@npm:7.13.15" dependencies: "@babel/code-frame": ^7.12.13 - "@babel/generator": ^7.13.0 + "@babel/generator": ^7.13.9 "@babel/helper-function-name": ^7.12.13 "@babel/helper-split-export-declaration": ^7.12.13 - "@babel/parser": ^7.13.0 - "@babel/types": ^7.13.0 + "@babel/parser": ^7.13.15 + "@babel/types": ^7.13.14 debug: ^4.1.0 globals: ^11.1.0 - lodash: ^4.17.19 - checksum: e5d1b690157da325b5bea98e472f4df0fff16048242a70880e2da7939b005ccd5b63d2b4527e203cfc71a422da0fa513c0ad84114bff002d583ebd7dbd2c8576 + checksum: 4ee49a25e7875e0a05e09ca685ac4f92316aeacfa81526aa947cdfdddb49e595ddb0459b3566dac100e85069ec08bcdce66f4897cc22fee341fb83cf10dbfd14 languageName: node linkType: hard -"@babel/types@npm:^7.0.0, @babel/types@npm:^7.12.13, @babel/types@npm:^7.13.0, @babel/types@npm:^7.13.12, @babel/types@npm:^7.3.0, @babel/types@npm:^7.3.3, @babel/types@npm:^7.8.3": - version: 7.13.12 - resolution: "@babel/types@npm:7.13.12" +"@babel/types@npm:^7.0.0, @babel/types@npm:^7.12.13, @babel/types@npm:^7.13.12, @babel/types@npm:^7.13.14, @babel/types@npm:^7.13.16, @babel/types@npm:^7.3.0, @babel/types@npm:^7.3.3, @babel/types@npm:^7.8.3": + version: 7.13.16 + resolution: "@babel/types@npm:7.13.16" dependencies: "@babel/helper-validator-identifier": ^7.12.11 - lodash: ^4.17.19 to-fast-properties: ^2.0.0 - checksum: 154392625ea7b7c550be1ebf624b9cfed394d11bf8b7cb39b0ec874a84313d26dc708cca62b18de9901bce19a9a187f0d4834e8cf365ad2fc9357c96c13923f7 + checksum: 220641637a3b3b4dbb8ea3d9b70051ba1f81f906cb776564aa70c0fa32364704867723e6f1df44b5fef6a39e9da8ae5a848d1e00d4576046316fce1c986a890b languageName: node linkType: hard @@ -627,20 +624,7 @@ __metadata: languageName: node linkType: hard -"@graphql-tools/utils@npm:^7.1.2": - version: 7.6.0 - resolution: "@graphql-tools/utils@npm:7.6.0" - dependencies: - "@ardatan/aggregate-error": 0.0.6 - camel-case: 4.1.2 - tslib: ~2.1.0 - peerDependencies: - graphql: ^14.0.0 || ^15.0.0 - checksum: 9fc3ca2fba490119cd9ea4b9daafed0712e906f246a3f394ce13159b703e0e82236916f5d31fc1c42eb66f4286e7cfe342b7d246c36a835d00019e726585ed6f - languageName: node - linkType: hard - -"@graphql-tools/utils@npm:^7.7.0, @graphql-tools/utils@npm:^7.7.3": +"@graphql-tools/utils@npm:^7.1.2, @graphql-tools/utils@npm:^7.7.0, @graphql-tools/utils@npm:^7.7.3": version: 7.7.3 resolution: "@graphql-tools/utils@npm:7.7.3" dependencies: @@ -889,12 +873,19 @@ __metadata: languageName: node linkType: hard +"@josephg/resolvable@npm:^1.0.0": + version: 1.0.0 + resolution: "@josephg/resolvable@npm:1.0.0" + checksum: 84e52a954fe37a2664daf62df66d22c23fca9cc33bc87998c14ede2e8c76307b180091e1a836bbbd2e181edf63333313ece8d493b80595c592b9a5361804eaed + languageName: node + linkType: hard + "@mapbox/node-pre-gyp@npm:^1.0.0": - version: 1.0.1 - resolution: "@mapbox/node-pre-gyp@npm:1.0.1" + version: 1.0.3 + resolution: "@mapbox/node-pre-gyp@npm:1.0.3" dependencies: detect-libc: ^1.0.3 - http-proxy-agent: ^4.0.1 + https-proxy-agent: ^5.0.0 make-dir: ^3.1.0 node-fetch: ^2.6.1 nopt: ^5.0.0 @@ -904,7 +895,7 @@ __metadata: tar: ^6.1.0 bin: node-pre-gyp: bin/node-pre-gyp - checksum: 9b816d390f126574fd8767b14ff4fd602601fd1952828ce8a1446040fc2903b30536646ee71cd3a542443bf9913b2734fccad6ad7753a90c209c8161db086dd6 + checksum: 9673b13af29da2e0a71beaebf01ea8110db7b913e357689e33149ade3170306ee4e517ff0f2bba51604dbf00b95564c293b2dec5c6989bd463fd6ab74af06310 languageName: node linkType: hard @@ -920,6 +911,7 @@ __metadata: graphql-tag: 2.11.0 jest: 26.2.2 libnpmsearch: 3.1.0 + neo4j-driver: 4.2.0 npm-run-all: ^4.1.5 pluralize: ^8.0.0 randomstring: 1.1.5 @@ -1030,9 +1022,9 @@ __metadata: linkType: hard "@popperjs/core@npm:^2.5.3": - version: 2.9.1 - resolution: "@popperjs/core@npm:2.9.1" - checksum: 6739f6344b67c393dd06dee4a8b60dbc22abec502497b5cef091aa859efc35fe1c924e3b21762bef2667b4736a5fe713ad075dcd8429a6671bf30470e8090898 + version: 2.9.2 + resolution: "@popperjs/core@npm:2.9.2" + checksum: cc4de8b46fc190805619224f1c683bee6a162276430af3728d35087099ad83a80da3c11c4eac7cb2b5aa2fa59d4c7c689e211a3e955136588ed6dedb5bff32c5 languageName: node linkType: hard @@ -1138,11 +1130,11 @@ __metadata: linkType: hard "@sinonjs/commons@npm:^1.7.0": - version: 1.8.2 - resolution: "@sinonjs/commons@npm:1.8.2" + version: 1.8.3 + resolution: "@sinonjs/commons@npm:1.8.3" dependencies: type-detect: 4.0.8 - checksum: b7eb499e3537a487160fcc42e65b9ad8c7d70ee4a1bbebacdbe28149e01b2da501912df2fbf06c81eac51de8c0ad10eaae573b31932ee747c9f1949fee30c20d + checksum: a7f3181512f67bbb9059dc9247febfda6dea58fc2a918360b208c6fde193b0c2cbe628650b0d13b4ba69f144470788eb6c2ef8a84e050dce4808be8511da4316 languageName: node linkType: hard @@ -1280,6 +1272,13 @@ __metadata: languageName: node linkType: hard +"@types/cors@npm:2.8.10": + version: 2.8.10 + resolution: "@types/cors@npm:2.8.10" + checksum: c3f3d6feee59ff75127fec3030d55c3d5f1adfc07953facdae67c47dcd54c83c46a5e92f08afa53542ec978da38a388697d30731019798cb157c9e96c64ef6c3 + languageName: node + linkType: hard + "@types/cors@npm:2.8.8": version: 2.8.8 resolution: "@types/cors@npm:2.8.8" @@ -1323,19 +1322,19 @@ __metadata: linkType: hard "@types/eslint@npm:*": - version: 7.2.7 - resolution: "@types/eslint@npm:7.2.7" + version: 7.2.10 + resolution: "@types/eslint@npm:7.2.10" dependencies: "@types/estree": "*" "@types/json-schema": "*" - checksum: cb7b820d887b51c9d620005a74cf223ec834565c366035cfaf4cc31d5681cc72d2fc421465f648019145e50f11222e35f0910139a13c2e46ff399e72cad0e431 + checksum: d85af4ab456fcf5d243e5a39d192d01ec71e14352b9ec803394ce6ac994fca0b876405dbdc07b97449275aee8285f9570a82117bbfeb132f97e01b8ddc35477a languageName: node linkType: hard "@types/estree@npm:*": - version: 0.0.46 - resolution: "@types/estree@npm:0.0.46" - checksum: 69fcf647706f5b6a475ec2f9aacf73b40866f577eef6c6f33de95cc3b4897381c2a8257646f13cd5d91fffc5debfe6289b6864ba29ad349ae68703f8b993c9f6 + version: 0.0.47 + resolution: "@types/estree@npm:0.0.47" + checksum: 28cba548c7b61855f4ff0c20146512e71fb578253e3cb24baf1acf660c626a8a271f99848e8a8c4e0e87f177cfce28e8d1fcecb65a4aad4a92ba48fd73179289 languageName: node linkType: hard @@ -1346,7 +1345,7 @@ __metadata: languageName: node linkType: hard -"@types/express-serve-static-core@npm:*, @types/express-serve-static-core@npm:^4.17.18": +"@types/express-serve-static-core@npm:*, @types/express-serve-static-core@npm:4.17.19, @types/express-serve-static-core@npm:^4.17.18": version: 4.17.19 resolution: "@types/express-serve-static-core@npm:4.17.19" dependencies: @@ -1368,17 +1367,6 @@ __metadata: languageName: node linkType: hard -"@types/express-serve-static-core@npm:4.17.18": - version: 4.17.18 - resolution: "@types/express-serve-static-core@npm:4.17.18" - dependencies: - "@types/node": "*" - "@types/qs": "*" - "@types/range-parser": "*" - checksum: 329d5ded5c6b77c40bbed136ddf34f6fbae1ec3c43dadb5309fa60cedc3de9508a78fcba756c54e0d6362127d29b114afe4fcc75dc42a44909d48a7114315dc4 - languageName: node - linkType: hard - "@types/express@npm:*, @types/express@npm:4.17.11": version: 4.17.11 resolution: "@types/express@npm:4.17.11" @@ -1555,12 +1543,12 @@ __metadata: linkType: hard "@types/jest@npm:26.x": - version: 26.0.21 - resolution: "@types/jest@npm:26.0.21" + version: 26.0.22 + resolution: "@types/jest@npm:26.0.22" dependencies: jest-diff: ^26.0.0 pretty-format: ^26.0.0 - checksum: c219599d663527302a261aaa7cc038b79c428d7af39b0a20c2167cb698ae280f3a238b2ca3594bcabbe7ee441a6370d4b3afd19c4a616aaa5556d5b9e875c081 + checksum: 4c98ed058522f6cc74bcb47b8b7b104b77b2d4e42e087171f3d2d3ae5338c21f43ec26f2a186bc229c1bd72c3f776ad07faba837f0ec27f22cf94e154516c0b3 languageName: node linkType: hard @@ -1661,9 +1649,9 @@ __metadata: linkType: hard "@types/minimatch@npm:*": - version: 3.0.3 - resolution: "@types/minimatch@npm:3.0.3" - checksum: 672ccdac197e8176eed1a9441d0caf8a29a90eb139b1cefdd4c9e71b1c48f5c749f5d101a2d85da15c6259214ebda95072835021407d60330a731a2672964b82 + version: 3.0.4 + resolution: "@types/minimatch@npm:3.0.4" + checksum: abbe7031d8a6144c36f1803c5c1914885c2349d5d73fc45aae44807c12c4c803b8acfb134c71c7eff75c462c218697f982b96633f8fdf71b83ec50eba36122a6 languageName: node linkType: hard @@ -1678,9 +1666,9 @@ __metadata: linkType: hard "@types/node@npm:*, @types/node@npm:>=6": - version: 14.14.35 - resolution: "@types/node@npm:14.14.35" - checksum: 0f6320bf5370d1ff82105fb7f26aa0658499c97d3ec78561e65b65724280244f281602541182b63470d2c8a98db22fbb4f91409c5c7c97da8c3bb8f97fbc5dbc + version: 14.14.41 + resolution: "@types/node@npm:14.14.41" + checksum: 37dfb639644c8ee9b9846106834983f590d494b855e74645a4f169ea24199f7559366d25f6e72e83ba940b59eb6370e002bd53963d098d6d9fdf935a37011417 languageName: node linkType: hard @@ -1699,9 +1687,9 @@ __metadata: linkType: hard "@types/node@npm:^10.1.0": - version: 10.17.55 - resolution: "@types/node@npm:10.17.55" - checksum: 03924314a7a6bd74f5d710b35b602f82b14e0bc95d650724a4296ed99aec9b8680885b78422a5e21586b2cb2b1d8148cd58ec99009e2ae6e2beaf1590c71a444 + version: 10.17.58 + resolution: "@types/node@npm:10.17.58" + checksum: 48412811a6c4f8d2d59a5e299b1600cdb3bdc5011db01f1cdf149f8f5a2f6fa5273370c1ce5eebbad1348a49251e88c680b008cfe09da6bfbb9a16d9aec3ff5a languageName: node linkType: hard @@ -1782,12 +1770,12 @@ __metadata: linkType: hard "@types/react-router@npm:*": - version: 5.1.12 - resolution: "@types/react-router@npm:5.1.12" + version: 5.1.13 + resolution: "@types/react-router@npm:5.1.13" dependencies: "@types/history": "*" "@types/react": "*" - checksum: a94fbbd2b29b3eb3542de8fdfc2ccd42d9ac88434529234bde2a1b604a7b38158b277180bf94cb4e73150d3d69b1ffc1e53ed0bbc90514489fddeeb378e28b16 + checksum: e5e2fe474b2d14030d93dadcd00eaf223c150f64ca00a6b32537d560442e7557444a967002416e1470cea07d1ada689459df62e27c8009263050126e4d435e5f languageName: node linkType: hard @@ -1879,10 +1867,19 @@ __metadata: languageName: node linkType: hard -"@types/tapable@npm:*, @types/tapable@npm:^1.0.5": - version: 1.0.6 - resolution: "@types/tapable@npm:1.0.6" - checksum: 01709a2f8dbea665a39c008ba6995c76210fabb52434815e7632c7fff22ecad1dd49a1d75b8f5b2e9b365c6d7a6407127bed834587df4777b800110c2a74fc36 +"@types/tapable@npm:*": + version: 2.2.2 + resolution: "@types/tapable@npm:2.2.2" + dependencies: + tapable: ^2.2.0 + checksum: 997dc289d3a234e73e5ebf6e628f61c0488f4bd57ab9507ab4f4783c2ee06bf0e42bd2e2e6b04901e5fad73e9bb63c83bea75ea33d64dd23d572a6bf2e1f0bb0 + languageName: node + linkType: hard + +"@types/tapable@npm:^1, @types/tapable@npm:^1.0.5": + version: 1.0.7 + resolution: "@types/tapable@npm:1.0.7" + checksum: af30bb7429d590c7df1f3f5b8ef55fcf2c5498cd2d972c40b0ee543a2e7c3df988b5ac29e231b22b09b712ea1df3dbf3eb145dcbbd43544534cbfb0f1cebdfac languageName: node linkType: hard @@ -1895,13 +1892,6 @@ __metadata: languageName: node linkType: hard -"@types/ungap__global-this@npm:^0.3.1": - version: 0.3.1 - resolution: "@types/ungap__global-this@npm:0.3.1" - checksum: c000b1f7792fa96def1e976d54bf23a127c99fa0bb0ee713e9792f9cf8fc97f4dba3313df9f9295e33f6461a54bd41279bb89ba1add1fb86d309b08e3a95f260 - languageName: node - linkType: hard - "@types/unist@npm:*, @types/unist@npm:^2.0.0, @types/unist@npm:^2.0.2, @types/unist@npm:^2.0.3": version: 2.0.3 resolution: "@types/unist@npm:2.0.3" @@ -1949,25 +1939,25 @@ __metadata: linkType: hard "@types/webpack@npm:^4.41.8": - version: 4.41.26 - resolution: "@types/webpack@npm:4.41.26" + version: 4.41.27 + resolution: "@types/webpack@npm:4.41.27" dependencies: "@types/anymatch": "*" "@types/node": "*" - "@types/tapable": "*" + "@types/tapable": ^1 "@types/uglify-js": "*" "@types/webpack-sources": "*" source-map: ^0.6.0 - checksum: c84012af1d0159e6c17b065139d8c15ffe18042445db4f9c61e2fe3aff1d4ebeb8a65af6824e991eb161334c2842c6d2b55f9d700bd7e64bf492f3dcbf1a92d1 + checksum: 5e10ad206accc6a9ec3dbea1b79625d441dc2d93cad61daa8ba77eea0a7b659f7ca605078ec06189e9b7eb48fa244b6cfc617771e8fc579cdd9b26546e8c3120 languageName: node linkType: hard "@types/ws@npm:^7.0.0": - version: 7.4.0 - resolution: "@types/ws@npm:7.4.0" + version: 7.4.1 + resolution: "@types/ws@npm:7.4.1" dependencies: "@types/node": "*" - checksum: fbb8c68e5865539f1518e119f741c7bf134c61dd2f7d0a653b9d6666811b5487cc434e24044069e1508f2c2e1138b413cb970a79713cab333d64201362746a1c + checksum: 69a752f6ffd809d170098e84bad046fa6589d9485e8e5292d2c48f8b8014b6b58779e4fac07a808895de79f595032ef055bb36b41945c6e1cc9d63010a0f50fb languageName: node linkType: hard @@ -2032,18 +2022,18 @@ __metadata: linkType: hard "@typescript-eslint/experimental-utils@npm:^4.0.1": - version: 4.19.0 - resolution: "@typescript-eslint/experimental-utils@npm:4.19.0" + version: 4.22.0 + resolution: "@typescript-eslint/experimental-utils@npm:4.22.0" dependencies: "@types/json-schema": ^7.0.3 - "@typescript-eslint/scope-manager": 4.19.0 - "@typescript-eslint/types": 4.19.0 - "@typescript-eslint/typescript-estree": 4.19.0 + "@typescript-eslint/scope-manager": 4.22.0 + "@typescript-eslint/types": 4.22.0 + "@typescript-eslint/typescript-estree": 4.22.0 eslint-scope: ^5.0.0 eslint-utils: ^2.0.0 peerDependencies: eslint: "*" - checksum: aac92241f5a73e6fb77270a106b8509ff6124873b16faeb1e2f48d492beb9f03cddd069d44c0e184a0621d315751224c957b40e52e25cf9d8bf0b358400316fc + checksum: afabf0d6f9e70b910575d8bc2e8ccd3416e8d05ed968296fc56379f71f8cf3a27107598b98f7c76a91e6b0be796dc102c866381a3af5bf24799a333532d1e997 languageName: node linkType: hard @@ -2065,19 +2055,19 @@ __metadata: linkType: hard "@typescript-eslint/parser@npm:^4.0.1": - version: 4.19.0 - resolution: "@typescript-eslint/parser@npm:4.19.0" + version: 4.22.0 + resolution: "@typescript-eslint/parser@npm:4.22.0" dependencies: - "@typescript-eslint/scope-manager": 4.19.0 - "@typescript-eslint/types": 4.19.0 - "@typescript-eslint/typescript-estree": 4.19.0 + "@typescript-eslint/scope-manager": 4.22.0 + "@typescript-eslint/types": 4.22.0 + "@typescript-eslint/typescript-estree": 4.22.0 debug: ^4.1.1 peerDependencies: eslint: ^5.0.0 || ^6.0.0 || ^7.0.0 peerDependenciesMeta: typescript: optional: true - checksum: eb9033469250ca0db08442c0a504cb57db5541fd31d2036d6822bca9966f638fba199eb32b31d9574534c302ffc0ebba65c4dba62dddbe56a2c85df0a5c6597a + checksum: 679e14a5cec5bae3b392b1736f5d919897fd1a269a9d25366babfd12c1d275b320ae36a0b8be215ba14780cb1feec2b386001b4e0225ef82bd0040bf5dbaf99f languageName: node linkType: hard @@ -2101,13 +2091,13 @@ __metadata: languageName: node linkType: hard -"@typescript-eslint/scope-manager@npm:4.19.0": - version: 4.19.0 - resolution: "@typescript-eslint/scope-manager@npm:4.19.0" +"@typescript-eslint/scope-manager@npm:4.22.0": + version: 4.22.0 + resolution: "@typescript-eslint/scope-manager@npm:4.22.0" dependencies: - "@typescript-eslint/types": 4.19.0 - "@typescript-eslint/visitor-keys": 4.19.0 - checksum: 746c74e40428e7a291832cb87fd96534a6cd081dbb9b4d83bbffa3486ab5e8ac59bacdef82d349e903c77c07f0ff784e3b2abc69022efc0f8f0cb445b91251a5 + "@typescript-eslint/types": 4.22.0 + "@typescript-eslint/visitor-keys": 4.22.0 + checksum: c6f5565f517373cba61d29be919c69ad0e178f2a007eed6f1d8f80518853c3c4e6a3a059e492920b71675f0828e093eb36ec9eef318b9e2b4e9e65b0e93f03b6 languageName: node linkType: hard @@ -2125,10 +2115,10 @@ __metadata: languageName: node linkType: hard -"@typescript-eslint/types@npm:4.19.0": - version: 4.19.0 - resolution: "@typescript-eslint/types@npm:4.19.0" - checksum: 86378fece710a598683dc172ede1a871290b15329dc60c13674a1d18d9c41a51c4194b8a35f1a253d2ee2b7fc222b4d449329fc68d512e425f36e9b7fd3626bb +"@typescript-eslint/types@npm:4.22.0": + version: 4.22.0 + resolution: "@typescript-eslint/types@npm:4.22.0" + checksum: db2717132540feba39b002cdb2483aa822e0b50c17f9deff918a52609178df071444188a1e76c07c51018c353b01509dd741272b6d482edf7d9e7d60adc6c70e languageName: node linkType: hard @@ -2169,12 +2159,12 @@ __metadata: languageName: node linkType: hard -"@typescript-eslint/typescript-estree@npm:4.19.0": - version: 4.19.0 - resolution: "@typescript-eslint/typescript-estree@npm:4.19.0" +"@typescript-eslint/typescript-estree@npm:4.22.0": + version: 4.22.0 + resolution: "@typescript-eslint/typescript-estree@npm:4.22.0" dependencies: - "@typescript-eslint/types": 4.19.0 - "@typescript-eslint/visitor-keys": 4.19.0 + "@typescript-eslint/types": 4.22.0 + "@typescript-eslint/visitor-keys": 4.22.0 debug: ^4.1.1 globby: ^11.0.1 is-glob: ^4.0.1 @@ -2183,7 +2173,7 @@ __metadata: peerDependenciesMeta: typescript: optional: true - checksum: 446457f2532f24c12740ffe24453a4ad32c3fc2a4e35c6dd8b8d8cb114c925d37084c4541a7723cd22ccdd83f205bc513134a2db0b6304900609f5acf2f69665 + checksum: 538d932361d1463c9450c155fc5696f4cc1a07db2bfd4ca9079e1f919e5062fd95d8dc128fc2fa8368c9582787cfc97ee6284083b94fe8d580cd1a9fca688efa languageName: node linkType: hard @@ -2207,20 +2197,13 @@ __metadata: languageName: node linkType: hard -"@typescript-eslint/visitor-keys@npm:4.19.0": - version: 4.19.0 - resolution: "@typescript-eslint/visitor-keys@npm:4.19.0" +"@typescript-eslint/visitor-keys@npm:4.22.0": + version: 4.22.0 + resolution: "@typescript-eslint/visitor-keys@npm:4.22.0" dependencies: - "@typescript-eslint/types": 4.19.0 + "@typescript-eslint/types": 4.22.0 eslint-visitor-keys: ^2.0.0 - checksum: d9cf3501ae69796850dcdadde7fdaa1f3fc27d54a380396cc6b67706f7d6329b0c35db9b23d96c83a4196a915681129fa6b324383fcee88f413e06f7d05edf16 - languageName: node - linkType: hard - -"@ungap/global-this@npm:^0.4.2": - version: 0.4.4 - resolution: "@ungap/global-this@npm:0.4.4" - checksum: 5ee0ba7cdffbb1c9205db99fd801dc49957ec519cb9a50b989a0c81d28ead04d8323e73f30d642ffd287f4dec1f39eb303f6a25e58b7a0102fd390154a0019f6 + checksum: 645896d05aa757fac02d952574ecda0eecd0be120162e28533c4528bb70d2162e9df62c3547217c69f18a72ceecaf212ea585afd20f976db64b59ac6de0d1ec8 languageName: node linkType: hard @@ -2406,35 +2389,35 @@ __metadata: linkType: hard "@webpack-cli/configtest@npm:^1.0.1": - version: 1.0.1 - resolution: "@webpack-cli/configtest@npm:1.0.1" + version: 1.0.2 + resolution: "@webpack-cli/configtest@npm:1.0.2" peerDependencies: webpack: 4.x.x || 5.x.x webpack-cli: 4.x.x - checksum: 6db91531c43658c7830767cd698e72dd2d569d85b306a9eedafc1d8a8935b0a9ecf3881b7fff21eca18695c3440e911f2020fa7b9ea29af41944f23efa54bd16 + checksum: 98edc004536d7fd212386a759b738f78f71dc24a7c10fa5245d3c4d2b33e47e9076c132d25aa94c291848ccf47e8986b71244785c95fbacf770a5d9f54dc8586 languageName: node linkType: hard "@webpack-cli/info@npm:^1.2.2": - version: 1.2.2 - resolution: "@webpack-cli/info@npm:1.2.2" + version: 1.2.3 + resolution: "@webpack-cli/info@npm:1.2.3" dependencies: envinfo: ^7.7.3 peerDependencies: webpack-cli: 4.x.x - checksum: ee23161d9ea56be871e67596f9d65b8342de858b59cb6658870bda474deaa328ea0d34320344eac704b88673a373456584e08748f0a7d60226bf76c2e667e706 + checksum: 0499e93583176fe0d3f1f8a2022f460c8177cf24e07d7b6110de4ac89dab42115d898095c856ede4cf2b4c1c36a4a6e0230658480fae341119d20e25d28f3e35 languageName: node linkType: hard "@webpack-cli/serve@npm:^1.3.0": - version: 1.3.0 - resolution: "@webpack-cli/serve@npm:1.3.0" + version: 1.3.1 + resolution: "@webpack-cli/serve@npm:1.3.1" peerDependencies: webpack-cli: 4.x.x peerDependenciesMeta: webpack-dev-server: optional: true - checksum: ce97bd9db98663375d62edbcd5711e057291e890c9e89254e4333fb9e6192252afca743b8a0fa087be00c6222db1c2e1d4da67707c6a679e1d9e1d7a3d001381 + checksum: 8a734da3451268d5d2ae24b57c7f824b452fb2eba8ea41f7b8830eb3f322a9649cc3d40a6dbb6f19017748bbdbf24cf459ad0ac27289b723d9b132b946c168c7 languageName: node linkType: hard @@ -2448,12 +2431,12 @@ __metadata: languageName: node linkType: hard -"@wry/context@npm:^0.5.2": - version: 0.5.4 - resolution: "@wry/context@npm:0.5.4" +"@wry/context@npm:^0.6.0": + version: 0.6.0 + resolution: "@wry/context@npm:0.6.0" dependencies: - tslib: ^1.14.1 - checksum: 4894bf9db998a0d6591cdbbf97de6162ae38efac364d0633319906cccc293159bc8b98784b2969f9f75927096e335b1d1bb7a299fdb25eff7e1fc449919b4023 + tslib: ^2.1.0 + checksum: c1452ba9009a13ddf86c98b7051167304fdeb9284438d9c7ccb2f86a3f9724fd2ce5685574d5949cd4a66918dd230fbb61185b62b5dbd1760a8dea4b6c6900c0 languageName: node linkType: hard @@ -2466,21 +2449,21 @@ __metadata: languageName: node linkType: hard -"@wry/equality@npm:^0.3.0": - version: 0.3.4 - resolution: "@wry/equality@npm:0.3.4" +"@wry/equality@npm:^0.4.0": + version: 0.4.0 + resolution: "@wry/equality@npm:0.4.0" dependencies: - tslib: ^1.14.1 - checksum: 6de84a1dcbbdc79f4b980b03e4111d97b1c3b8311e5db81c105d17109a258542a4aadef01294e21bf253e8e40702900913d25f55fc72dd76f5d7a844c706783e + tslib: ^2.1.0 + checksum: 87c2b705edf0cc81e8b034367765762f3d2a1a0bfd9163b70389398bc0fc0338e1f8d68b2eaa70b0f5101c455bf5d419ae4a4f03f7f7697803e34adb9ca86b72 languageName: node linkType: hard -"@wry/trie@npm:^0.2.1": - version: 0.2.2 - resolution: "@wry/trie@npm:0.2.2" +"@wry/trie@npm:^0.3.0": + version: 0.3.0 + resolution: "@wry/trie@npm:0.3.0" dependencies: - tslib: ^1.14.1 - checksum: 7e6a1570bfc04f9f50a8fb550b1cd458386e4e963334e700cc2a450ecb795dad1d06c4fbfbf9981c69a7faec4d2b98513fec803cfc30a4d3d5ac649a7f32e28f + tslib: ^2.1.0 + checksum: 74305830c7138924772073fbe6aeaadf2a9a55bc16ac4a2436f17dff83bb32950a17dbbb4fcdfb9f63977a53e3f8cda0dd33b18cfdbd5ba6f6484f84d12a504e languageName: node linkType: hard @@ -2557,12 +2540,12 @@ __metadata: languageName: node linkType: hard -"acorn@npm:^8.0.4, acorn@npm:^8.0.5": - version: 8.1.0 - resolution: "acorn@npm:8.1.0" +"acorn@npm:^8.0.4, acorn@npm:^8.1.0": + version: 8.1.1 + resolution: "acorn@npm:8.1.1" bin: acorn: bin/acorn - checksum: 99ccf30832b00ff7e19dff353479fd303c5a82c4ae0a5c5904a6c03316658b89bbdca40f5d8473e6aedd988a404190abd7b431dbd3160df4c09a10398b84bf1c + checksum: 9726714a9b5319f3d4969f8ace546a47086a7ea986f68fae3a2ffaabec219566c87b1ac21139ee3653462639cac357c9b8846725b7e72a741cc2421563a23ac8 languageName: node linkType: hard @@ -2650,11 +2633,11 @@ __metadata: linkType: hard "ansi-escapes@npm:^4.2.1, ansi-escapes@npm:^4.3.0": - version: 4.3.1 - resolution: "ansi-escapes@npm:4.3.1" + version: 4.3.2 + resolution: "ansi-escapes@npm:4.3.2" dependencies: - type-fest: ^0.11.0 - checksum: bcb39e57bd32af0236c4ded96aaf8ef5d86c5a4683762b0be998c68cd11d5afd93296f4b5e087a3557da82a899b7c4d081483d603a4d4647e6a6613bf1aded8a + type-fest: ^0.21.3 + checksum: eca4d4e15b214376b04c8ce16d75adcfdcf706c38d682474d84d007f792d2f0f2f217b613ed3e7545fa0ad9f1d815ccd2a942c6b1d3156fff01b00652090fcb8 languageName: node linkType: hard @@ -2724,24 +2707,24 @@ __metadata: linkType: hard "anymatch@npm:^3.0.3, anymatch@npm:~3.1.1": - version: 3.1.1 - resolution: "anymatch@npm:3.1.1" + version: 3.1.2 + resolution: "anymatch@npm:3.1.2" dependencies: normalize-path: ^3.0.0 picomatch: ^2.0.4 - checksum: cf61bbaf7f34d9f94dd966230b7a7f8f1f24e3e2185540741a2561118e108206d85101ee2fc9876cd756475dbe6573d84d91115c3abdbf53a64e26a5f1f06b67 + checksum: cd6c08eb8d435741a9de6f5695c75cfba747a50772929ca588235535c6a57d37f2c2b34057768f015fd92abb88108b122ed2e399faac6ae30363a8ca0b6107d0 languageName: node linkType: hard -"apollo-cache-control@npm:^0.11.6": - version: 0.11.6 - resolution: "apollo-cache-control@npm:0.11.6" +"apollo-cache-control@npm:^0.12.0": + version: 0.12.0 + resolution: "apollo-cache-control@npm:0.12.0" dependencies: apollo-server-env: ^3.0.0 - apollo-server-plugin-base: ^0.10.4 + apollo-server-plugin-base: ^0.11.0 peerDependencies: graphql: ^0.12.0 || ^0.13.0 || ^14.0.0 || ^15.0.0 - checksum: e7a4b8f31b3e83445fc10fbb60c8727eaa1825d49ea14712568403d6511b1b75b6c66627ece0da2e2297c24437c0926d8208b0a51a89fe162b8ce65466c4e365 + checksum: dcf8004de55ec8b0c59298b8363e28a4cd53b5f90d4c3c3b529b3d63482dc6b68f8b5f09c1d3dd5e3d677b7917ae2066c470a587bb4eeb6756cb6cf361e5043d languageName: node linkType: hard @@ -2790,13 +2773,13 @@ __metadata: languageName: node linkType: hard -"apollo-datasource@npm:^0.7.3": - version: 0.7.3 - resolution: "apollo-datasource@npm:0.7.3" +"apollo-datasource@npm:^0.8.0": + version: 0.8.0 + resolution: "apollo-datasource@npm:0.8.0" dependencies: - apollo-server-caching: ^0.5.3 + apollo-server-caching: ^0.6.0 apollo-server-env: ^3.0.0 - checksum: 79361da6546a12173646972395989a8df41b5fc423362c9c97cf4eb72771cfda1441e76d1ec7f3e5a84e5b95bf1ba7ef31322eb8719b0008813c720d3792aa19 + checksum: ae8c54e1d5662370945d7ca94017ff580d04820f0ba61b0180cabaa016de4a1a6f8911de17e5a402ea5c835f2f1c82adbf5801904d258648c86cf565c81d8701 languageName: node linkType: hard @@ -2903,27 +2886,37 @@ __metadata: languageName: node linkType: hard -"apollo-server-core@npm:^2.19.0, apollo-server-core@npm:^2.21.0, apollo-server-core@npm:^2.21.2": - version: 2.21.2 - resolution: "apollo-server-core@npm:2.21.2" +"apollo-server-caching@npm:^0.6.0": + version: 0.6.0 + resolution: "apollo-server-caching@npm:0.6.0" + dependencies: + lru-cache: ^6.0.0 + checksum: 21107686250724fc23068a23cbf42743fadaa6b6c519036eefd64fd9c4502501ab3694b63882dd08ddb408f03781f93a4488b81cb73560332e64a0cb36e14fee + languageName: node + linkType: hard + +"apollo-server-core@npm:^2.19.0, apollo-server-core@npm:^2.21.0, apollo-server-core@npm:^2.23.0": + version: 2.23.0 + resolution: "apollo-server-core@npm:2.23.0" dependencies: "@apollographql/apollo-tools": ^0.4.3 "@apollographql/graphql-playground-html": 1.6.27 "@apollographql/graphql-upload-8-fork": ^8.1.3 + "@josephg/resolvable": ^1.0.0 "@types/ws": ^7.0.0 - apollo-cache-control: ^0.11.6 - apollo-datasource: ^0.7.3 + apollo-cache-control: ^0.12.0 + apollo-datasource: ^0.8.0 apollo-graphql: ^0.6.0 apollo-reporting-protobuf: ^0.6.2 - apollo-server-caching: ^0.5.3 + apollo-server-caching: ^0.6.0 apollo-server-env: ^3.0.0 - apollo-server-errors: ^2.4.2 - apollo-server-plugin-base: ^0.10.4 - apollo-server-types: ^0.6.3 - apollo-tracing: ^0.12.2 + apollo-server-errors: ^2.5.0 + apollo-server-plugin-base: ^0.11.0 + apollo-server-types: ^0.7.0 + apollo-tracing: ^0.13.0 async-retry: ^1.2.1 fast-json-stable-stringify: ^2.0.0 - graphql-extensions: ^0.12.8 + graphql-extensions: ^0.13.0 graphql-tag: ^2.11.0 graphql-tools: ^4.0.8 loglevel: ^1.6.7 @@ -2934,7 +2927,7 @@ __metadata: ws: ^6.0.0 peerDependencies: graphql: ^0.12.0 || ^0.13.0 || ^14.0.0 || ^15.0.0 - checksum: b7be2fd9e8b2ab31a4fa7024b98ea741ebb6cf514ef10d6ad47c0690aff8d6c2729384485ac129a9672d7f2abe83c229edf8cb520cb217e903a97f614771e5dd + checksum: 0fdfe024e76572a46cb0e3dde279fe15f75bda138516f23a50de8a0c92280bc52c042da6178b6d930490a51066f9a65e16bda08a87f665bce31b52c57759dcbc languageName: node linkType: hard @@ -2948,12 +2941,12 @@ __metadata: languageName: node linkType: hard -"apollo-server-errors@npm:^2.4.2": - version: 2.4.2 - resolution: "apollo-server-errors@npm:2.4.2" +"apollo-server-errors@npm:^2.5.0": + version: 2.5.0 + resolution: "apollo-server-errors@npm:2.5.0" peerDependencies: graphql: ^0.12.0 || ^0.13.0 || ^14.0.0 || ^15.0.0 - checksum: 638fc54b24dcfd473fb55db4d9998bfad0b91b9c4b27f41e4a983b36055eed038a7d848470357318f28d78ea2c3f6e8418c5def07a88336cff5d33fe35891ba0 + checksum: 53a46de9808812766a78b79b73dcee69339be511e2c9b964881b881e2c6b18ccf364fb47b3618f4d9af6522321839f1545efd4a3fd03eace13f9cde069a7717f languageName: node linkType: hard @@ -2985,20 +2978,20 @@ __metadata: linkType: hard "apollo-server-express@npm:^2.21.0": - version: 2.21.2 - resolution: "apollo-server-express@npm:2.21.2" + version: 2.23.0 + resolution: "apollo-server-express@npm:2.23.0" dependencies: "@apollographql/graphql-playground-html": 1.6.27 "@types/accepts": ^1.3.5 "@types/body-parser": 1.19.0 - "@types/cors": 2.8.8 + "@types/cors": 2.8.10 "@types/express": 4.17.11 - "@types/express-serve-static-core": 4.17.18 + "@types/express-serve-static-core": 4.17.19 accepts: ^1.3.5 - apollo-server-core: ^2.21.2 - apollo-server-types: ^0.6.3 + apollo-server-core: ^2.23.0 + apollo-server-types: ^0.7.0 body-parser: ^1.18.3 - cors: ^2.8.4 + cors: ^2.8.5 express: ^4.17.1 graphql-subscriptions: ^1.0.0 graphql-tools: ^4.0.8 @@ -3007,18 +3000,18 @@ __metadata: type-is: ^1.6.16 peerDependencies: graphql: ^0.12.0 || ^0.13.0 || ^14.0.0 || ^15.0.0 - checksum: fa07969288a2881980b3f492560a7af33944e37ce98867e75125e059658fd70b3267de07c750dd7ba501d5b06dd78ac86fe255c4663170df71871cb7f06ed0b2 + checksum: b79a561c5724668dcabccb3765eec07ed80be5e8a5860948c557fa845bf04c050a2887d4e5e46b1450ca27c11ac13cf59efe7c13728614550575c6f9065e9e18 languageName: node linkType: hard -"apollo-server-plugin-base@npm:^0.10.4": - version: 0.10.4 - resolution: "apollo-server-plugin-base@npm:0.10.4" +"apollo-server-plugin-base@npm:^0.11.0": + version: 0.11.0 + resolution: "apollo-server-plugin-base@npm:0.11.0" dependencies: - apollo-server-types: ^0.6.3 + apollo-server-types: ^0.7.0 peerDependencies: graphql: ^0.12.0 || ^0.13.0 || ^14.0.0 || ^15.0.0 - checksum: eff9ec5f0cc36a4635c3324e98cdf3c4746ad5f2d04c1799ce15d6173743f8e6ec80c22825c2d51841083219a82cc2c9686ac84979999cb74140e9329a087394 + checksum: 2859555c80589134aee6fd8f4a785db5440a93c481cfdfed6294f2a42f8532d6c5f849ad7786aa0ac85cdffad8f283ee17e097a549c413bc0763bc9b4d629532 languageName: node linkType: hard @@ -3033,7 +3026,7 @@ __metadata: languageName: node linkType: hard -"apollo-server-types@npm:^0.6.1, apollo-server-types@npm:^0.6.3": +"apollo-server-types@npm:^0.6.1": version: 0.6.3 resolution: "apollo-server-types@npm:0.6.3" dependencies: @@ -3046,6 +3039,19 @@ __metadata: languageName: node linkType: hard +"apollo-server-types@npm:^0.7.0": + version: 0.7.0 + resolution: "apollo-server-types@npm:0.7.0" + dependencies: + apollo-reporting-protobuf: ^0.6.2 + apollo-server-caching: ^0.6.0 + apollo-server-env: ^3.0.0 + peerDependencies: + graphql: ^0.12.0 || ^0.13.0 || ^14.0.0 || ^15.0.0 + checksum: 8120fa39e424c074731482ec968258c09f165a38e2ae813d34f447647ed964827ddae72c9011b9479f07792f03c474bb4224e04f5d2fcd2dadba322959f8d959 + languageName: node + linkType: hard + "apollo-server@npm:2.21.0": version: 2.21.0 resolution: "apollo-server@npm:2.21.0" @@ -3062,15 +3068,15 @@ __metadata: languageName: node linkType: hard -"apollo-tracing@npm:^0.12.2": - version: 0.12.2 - resolution: "apollo-tracing@npm:0.12.2" +"apollo-tracing@npm:^0.13.0": + version: 0.13.0 + resolution: "apollo-tracing@npm:0.13.0" dependencies: apollo-server-env: ^3.0.0 - apollo-server-plugin-base: ^0.10.4 + apollo-server-plugin-base: ^0.11.0 peerDependencies: graphql: ^0.12.0 || ^0.13.0 || ^14.0.0 || ^15.0.0 - checksum: e8b0b90e03c44f531f55b3e32946091b3b7ad334641b60995f6d8f535d651c6bedc214dedee5fe5a1cb46d0d62c863b1013bf7091e0a4e0c6d5b529f987ecd51 + checksum: ae50d736a3d8d87dd5c0c2e2d9271ad33d8a5a8b128f42c8e5efb60975daf5a361b76fa2bafd8fd28c4fff04d418010bec9a196279844b1f2078692047b08462 languageName: node linkType: hard @@ -3362,9 +3368,9 @@ __metadata: linkType: hard "axe-core@npm:^4.0.2": - version: 4.1.3 - resolution: "axe-core@npm:4.1.3" - checksum: f711c530fb6b25a02dfde4a0410063a50b4f7bf7e4ee649376a51dcaceac61743e0de7b282a2798ccdbc512d2de22a62662211278da78ee039e56be54d75f090 + version: 4.1.4 + resolution: "axe-core@npm:4.1.4" + checksum: 66008b9fbda484733945d2a8539d94d7bd20b3416a0a3e5e716aa11f9b03e566acd2ad345c92ba632c55107dd5c9627bf5e62d2758c0f2a897a345c922b8dac8 languageName: node linkType: hard @@ -3467,9 +3473,9 @@ __metadata: linkType: hard "balanced-match@npm:^1.0.0": - version: 1.0.0 - resolution: "balanced-match@npm:1.0.0" - checksum: f515a605fe1b59f476f7477c5e1d53ad55b4f42982fca1d57b6701906f4ad1f1ac90fd6587d92cc1af2edb43eecf979214dd847ee410a6de9db4ebf0dd128d62 + version: 1.0.2 + resolution: "balanced-match@npm:1.0.2" + checksum: 690643f3009a04289ac401079de5a780aae452f7625fb2884051cc847b231e6521ee15dd6430b066d3cf4bd8bb00bb7ff55b7d134f34b8f0b8c043806796f94e languageName: node linkType: hard @@ -3644,17 +3650,17 @@ __metadata: linkType: hard "browserslist@npm:^4.14.5": - version: 4.16.3 - resolution: "browserslist@npm:4.16.3" + version: 4.16.4 + resolution: "browserslist@npm:4.16.4" dependencies: - caniuse-lite: ^1.0.30001181 - colorette: ^1.2.1 - electron-to-chromium: ^1.3.649 + caniuse-lite: ^1.0.30001208 + colorette: ^1.2.2 + electron-to-chromium: ^1.3.712 escalade: ^3.1.1 - node-releases: ^1.1.70 + node-releases: ^1.1.71 bin: browserslist: cli.js - checksum: dfab0d3c3d9a3517cf3f8a274bc4e8245f3a02c1a5ae2a0e01498273d363952d11ee09fdce3b0ce551f6cab9d619ed2d9facf7b6471c9190df949a5ad39665c5 + checksum: 00071f51695eae0d33c6193f37af87c690e5049dc615aeebae32bd0a60ad64698f29b8a579667012a177bff532f6235f22d1a96bfb30bf6364631914e2d64294 languageName: node linkType: hard @@ -3825,10 +3831,10 @@ __metadata: languageName: node linkType: hard -"caniuse-lite@npm:^1.0.30001181": - version: 1.0.30001204 - resolution: "caniuse-lite@npm:1.0.30001204" - checksum: 650f320ece8aa5eb1caf406a143d93097af97b84070b9a01028f41a8feab1eae8364478c4e0e0571a962ef245c9b6fbf3ea611295c9882e5f97b8b83d97de2de +"caniuse-lite@npm:^1.0.30001208": + version: 1.0.30001214 + resolution: "caniuse-lite@npm:1.0.30001214" + checksum: 96c09af8989fe03e6aa0cc0130be3392c4a871093f0ae7190cb1185862a63b54de14483561578564d034cf993c315d4939727badee39ed76144e94ae4ab2a0f7 languageName: node linkType: hard @@ -3957,11 +3963,9 @@ __metadata: linkType: hard "chrome-trace-event@npm:^1.0.2": - version: 1.0.2 - resolution: "chrome-trace-event@npm:1.0.2" - dependencies: - tslib: ^1.9.0 - checksum: 926fe23bc92e35c7fb666711c1dc1f342f289a728eb37d23bc4371df7587fe58152569eb57d657e2377f2e56093513939cab5a5a8f3589743938cc0b61527c02 + version: 1.0.3 + resolution: "chrome-trace-event@npm:1.0.3" + checksum: 0420a2d7eaf675c3fed5170ba52ea8e8b24654891a9efe398b90375c77558ef5612aa672bdd71d2cbcd6d97ca6461919834b879a2b223f8a6d86c1e1c756855c languageName: node linkType: hard @@ -3992,9 +3996,9 @@ __metadata: linkType: hard "classnames@npm:^2.2.6": - version: 2.2.6 - resolution: "classnames@npm:2.2.6" - checksum: 490eaeca5931846737ffd33e472a701d268d5b8bc5717dd4cf108a127b06e86e05350e06799abbbe763a0e4c945b4217f6700b7ae00ddc703505682c370e5cf2 + version: 2.3.1 + resolution: "classnames@npm:2.3.1" + checksum: 57d536edede609f81425d24b062d8d720a466565faf1e38d32c881e883920baa71519ac70c7b565e9cd39201fb1c1ff9bdf8aabf8e26544bac481e7924867c83 languageName: node linkType: hard @@ -4353,16 +4357,16 @@ __metadata: linkType: hard "core-js-pure@npm:^3.0.0": - version: 3.10.0 - resolution: "core-js-pure@npm:3.10.0" - checksum: 987b8428ce5732e9e77ba640b8c254054a304fc7e9672ea6c537abc705b192d5cb30b857e904e4cc931b73d29227e3c98f4a4a1e0247c3bca59f7a93e57b10b6 + version: 3.10.2 + resolution: "core-js-pure@npm:3.10.2" + checksum: 6afa50b38c1a92c8367c37e0194e800c6ba4c22f6c9fce9786e3d1e8ed6f6f63eb95fe097369323a1ae0573ed25d9893fc2912ca2de544c1b90fcbdff0ebd419 languageName: node linkType: hard "core-js@npm:^3.0.1": - version: 3.9.1 - resolution: "core-js@npm:3.9.1" - checksum: 3f360466246e816ff745f349bf0ea0c54bc3a05203638d84c5f0eae3583f07e7d848d6aa9b69c30467efb418e526bae034a6da50bcfda8b2cd413e5144cd1444 + version: 3.10.2 + resolution: "core-js@npm:3.10.2" + checksum: 6ff7c525419144998bfbe9c101872fcd350f46c455375e794fe34eb8d086bfdabb95a67da9eb0e98bcfc190f2cf4d7efd43eb726dcdb5f12a46dc5c8a7191f54 languageName: node linkType: hard @@ -4373,7 +4377,7 @@ __metadata: languageName: node linkType: hard -"cors@npm:^2.8.4": +"cors@npm:^2.8.4, cors@npm:^2.8.5": version: 2.8.5 resolution: "cors@npm:2.8.5" dependencies: @@ -4527,9 +4531,9 @@ __metadata: linkType: hard "csstype@npm:^3.0.2": - version: 3.0.7 - resolution: "csstype@npm:3.0.7" - checksum: 76d542d719cd6bca7c491e6425a28873f76b0f4cf602b626a9fee105806446be4fab2191c5d18a045aea412bb3d5dcb5cab9414328080c672671433b786746f5 + version: 3.0.8 + resolution: "csstype@npm:3.0.8" + checksum: e15233592a2c580fd72c4346a5c921044b8f4f29bcb81628a81199c4d6a91eb8f8e4875f440ef9c990e85f179a3370f3b842fe55e4743119ad0ce712519e7123 languageName: node linkType: hard @@ -4561,9 +4565,9 @@ __metadata: linkType: hard "date-fns@npm:^2.16.1": - version: 2.19.0 - resolution: "date-fns@npm:2.19.0" - checksum: 99ec34199c3a61cdb7fd27dcd68dd3c0c949ddfc34aa1daba9a6b2e0b5381bf42d8955d28ec2770f72eee429f5e7ab10fadba7b69108379d2545f003461d04f7 + version: 2.21.1 + resolution: "date-fns@npm:2.21.1" + checksum: 00a2ddea1047c4ce6eaadda76a0ee0782d1cfe65061641bbff94f7a70d2d6ab12dac89e027b39d49710bdb2cf264bc1a4e096b0324c7de79699296a4c19f4a40 languageName: node linkType: hard @@ -4954,13 +4958,13 @@ __metadata: linkType: hard "dom-serializer@npm:^1.0.1": - version: 1.2.0 - resolution: "dom-serializer@npm:1.2.0" + version: 1.3.1 + resolution: "dom-serializer@npm:1.3.1" dependencies: domelementtype: ^2.0.1 domhandler: ^4.0.0 entities: ^2.0.0 - checksum: 77e3bff86555c853af8a5f87f7433bdaf47fd377ed201b74c465c08445daf3832380acfe25276e6806ffad87ea42e57d4fb992021aef83c5dfae2d352b90860b + checksum: b5260cc10372a0a36661c429fa4bf351930ee130ca4370bad99a9440bda34f43e592190e6bff060957d1f38f11945991fe95a6fb043ef99dcdd8107e8c31d755 languageName: node linkType: hard @@ -4971,10 +4975,10 @@ __metadata: languageName: node linkType: hard -"domelementtype@npm:^2.0.1, domelementtype@npm:^2.1.0": - version: 2.1.0 - resolution: "domelementtype@npm:2.1.0" - checksum: c3e63b6c94bf74d6375e12370f612d1cd61c0d3bc21b46684d93c797b3924de2e84278b0b5cdf3dce21f64ee94c34a005994f373c0e420759ae1856f075f0f57 +"domelementtype@npm:^2.0.1, domelementtype@npm:^2.2.0": + version: 2.2.0 + resolution: "domelementtype@npm:2.2.0" + checksum: 70af22cd69a8e0c0cd4fbbba0459991aacb015f60765050b4a6d1750fd201b4bd4fd1e6922e945200f9cc725cd61be1cd393a3b9b576187759e3b046f33a4a30 languageName: node linkType: hard @@ -5005,12 +5009,12 @@ __metadata: languageName: node linkType: hard -"domhandler@npm:^4.0.0": - version: 4.0.0 - resolution: "domhandler@npm:4.0.0" +"domhandler@npm:^4.0.0, domhandler@npm:^4.2.0": + version: 4.2.0 + resolution: "domhandler@npm:4.2.0" dependencies: - domelementtype: ^2.1.0 - checksum: 22cc8e1335728a7c49434d1d12ff1563aea758c26c8ebf50fcf9e28ceb2bd0e5a15518d69abdb5db37aa7c0c347c8f68d323d12fc744a68853fb7641cbdcec89 + domelementtype: ^2.2.0 + checksum: 1bdb0ae6b9a93f4a2e8a77da304a435bfd35af0e52c5208f24277093b7fa2e6084cdbd4eb7fdd5c0ca5bf2c67736a19b258fe9e61588f4c49eaa0abde8d3595d languageName: node linkType: hard @@ -5025,13 +5029,13 @@ __metadata: linkType: hard "domutils@npm:^2.4.2": - version: 2.5.0 - resolution: "domutils@npm:2.5.0" + version: 2.6.0 + resolution: "domutils@npm:2.6.0" dependencies: dom-serializer: ^1.0.1 - domelementtype: ^2.0.1 - domhandler: ^4.0.0 - checksum: 92a68066d3abfc821438e0610d656f1a51fe695c993c6b10faf9a4ffa565c23d71907e976c674b83e64d41e2a6c108cfd489a34068a7d9f3d240c44509216670 + domelementtype: ^2.2.0 + domhandler: ^4.2.0 + checksum: 9da918510929e787d029034986287760f304ce089bdc3538482a3eee3e50abe9c055fa0c44f4366117efb8323615bd0228bdcbb0ca9799f80f7d3c2fc4df20ba languageName: node linkType: hard @@ -5123,10 +5127,10 @@ __metadata: languageName: node linkType: hard -"electron-to-chromium@npm:^1.3.649": - version: 1.3.695 - resolution: "electron-to-chromium@npm:1.3.695" - checksum: 4ac0ca5f4f20814553c17a510aab7158412effaf752fa093c5635c6c15978f8fc531a167a74b881f275a488f479ed393e065139f172b5a7f250f1c45b1a0d0b6 +"electron-to-chromium@npm:^1.3.712": + version: 1.3.717 + resolution: "electron-to-chromium@npm:1.3.717" + checksum: 4ca745fa475cf2aef6877d31ad97a3adada13f04723a84f5954971052921dea5819c0cf0df9f2b7114521b8740ebfbe9b4e6ec86f995b056645f6267a8a4d42a languageName: node linkType: hard @@ -5202,12 +5206,12 @@ __metadata: linkType: hard "enhanced-resolve@npm:^5.3.1": - version: 5.7.0 - resolution: "enhanced-resolve@npm:5.7.0" + version: 5.8.0 + resolution: "enhanced-resolve@npm:5.8.0" dependencies: graceful-fs: ^4.2.4 tapable: ^2.2.0 - checksum: 545cfa659e9cdccf1240bccbbd1791db7ec589979d71b35df5aeaf872dd8d13fab379ad73fa960f4cb32963b85492792c0fb0866f484043740014824ae6088b9 + checksum: a3e1131c9ba0dd6f8276f068ddac4e6469d824ee8132f748e2734722b9f25360f4cb5a7fbec1cab8cd56815a6762e0bb1b8d088cbdf2a276d30d573ac5528bbb languageName: node linkType: hard @@ -5242,11 +5246,11 @@ __metadata: linkType: hard "envinfo@npm:^7.7.3": - version: 7.7.4 - resolution: "envinfo@npm:7.7.4" + version: 7.8.1 + resolution: "envinfo@npm:7.8.1" bin: envinfo: dist/cli.js - checksum: 0a3ffb4ad515a9c7068824d57da6d146205478da71b54d3129d364eacd429fea2e8fb7921a66acd6773af0d066a849f517ab4a694a91eba6ef508d9a9771214a + checksum: 1b16cacff3c8bc3ad020eb9a87e55e7565414f6ba7054e288d42d8d145777ebbe63a84fc5e3575458ec618c679018a0c1bd8b37b8de8dcf38605e3a8b5a2bfca languageName: node linkType: hard @@ -5555,8 +5559,8 @@ __metadata: linkType: hard "eslint-plugin-react@npm:^7.23.1": - version: 7.23.1 - resolution: "eslint-plugin-react@npm:7.23.1" + version: 7.23.2 + resolution: "eslint-plugin-react@npm:7.23.2" dependencies: array-includes: ^3.1.3 array.prototype.flatmap: ^1.2.4 @@ -5572,7 +5576,7 @@ __metadata: string.prototype.matchall: ^4.0.4 peerDependencies: eslint: ^3 || ^4 || ^5 || ^6 || ^7 - checksum: 1c9cfbe6f378d09c620d127c6f6e7708e0f482787a38dbd935b137c70ea65af8d648fda6b2755cd028ebed461628e230038146ab3b10eb9a76f02388ae554565 + checksum: 0607db70fe5dd8366f046fee0bb8213b72a5f801fced1b82a7c85d5e88eac5cee43c221a0a20b032925210cbd52e2669a10ae03f1bd58e03485e2c18070cbb57 languageName: node linkType: hard @@ -5754,9 +5758,9 @@ __metadata: linkType: hard "exec-sh@npm:^0.3.2": - version: 0.3.5 - resolution: "exec-sh@npm:0.3.5" - checksum: a4da869075890e0a2df53cb464fab53e3082b295253a4e59435ab0159af545a863ce5471e572ed16bc515b3e28e0ac37bdc5c978b33f3f5a300433bc69776f1b + version: 0.3.6 + resolution: "exec-sh@npm:0.3.6" + checksum: 0205697efea87a52309a1ef8cf5339817c1ade8963aa92435f1754317aa242e03b7f3dbfa367c2c5313d239554f86a7ed9df10b459a674f24150b7577d64033c languageName: node linkType: hard @@ -6417,9 +6421,9 @@ fsevents@^1.2.7: linkType: hard "get-stream@npm:^6.0.0": - version: 6.0.0 - resolution: "get-stream@npm:6.0.0" - checksum: 4354a4de78ebfd4340db6c7a3956ad1db7e67dbf718bcc576481697188442156f88d0d79d94b8af2615dad9920d41df85227e0c6b0fe5764d26e0df25f4035f8 + version: 6.0.1 + resolution: "get-stream@npm:6.0.1" + checksum: 83de1fde5b21f879b91e45c1be765f53cf041873d65aea3b5a15cd53d4bc7825118693b1f50efb5c33a5d979dd20b398b6af955ffd70a013017da933b18fa5c8 languageName: node linkType: hard @@ -6550,7 +6554,7 @@ fsevents@^1.2.7: languageName: node linkType: hard -"graceful-fs@npm:^4.1.11, graceful-fs@npm:^4.1.2, graceful-fs@npm:^4.2.3, graceful-fs@npm:^4.2.4": +"graceful-fs@npm:^4.1.11, graceful-fs@npm:^4.1.2, graceful-fs@npm:^4.2.4, graceful-fs@npm:^4.2.6": version: 4.2.6 resolution: "graceful-fs@npm:4.2.6" checksum: 84d39c7756892553da990a9db7e45f844b3309b37b5a00174cbb4748476f2250c54f24594d4d252f64f085c65c2fdac7c809419bf6d55f0e6e42eb07ac0f5bf2 @@ -6569,16 +6573,16 @@ fsevents@^1.2.7: languageName: node linkType: hard -"graphql-extensions@npm:^0.12.8": - version: 0.12.8 - resolution: "graphql-extensions@npm:0.12.8" +"graphql-extensions@npm:^0.13.0": + version: 0.13.0 + resolution: "graphql-extensions@npm:0.13.0" dependencies: "@apollographql/apollo-tools": ^0.4.3 apollo-server-env: ^3.0.0 - apollo-server-types: ^0.6.3 + apollo-server-types: ^0.7.0 peerDependencies: graphql: ^0.12.0 || ^0.13.0 || ^14.0.0 || ^15.0.0 - checksum: d305508d19db9b100f93b20b21a0d2688053d37a52b8c1a34b53601a735562441ed60a54078d18a083754c618925f5651e423570e5cc8a82ff3c153c151f22bc + checksum: d40fe8769a6a3d5f99af43c3a2b6eecab5cfa2ccb2bcd4f7a613880ce422f96095034e20d34bd900fbe8bc7b269d6d129c2f898c18b04d3085c3aa8f526d4123 languageName: node linkType: hard @@ -6694,7 +6698,7 @@ fsevents@^1.2.7: languageName: node linkType: hard -"has-bigints@npm:^1.0.0": +"has-bigints@npm:^1.0.1": version: 1.0.1 resolution: "has-bigints@npm:1.0.1" checksum: 1074b644f5f2c319fc31af00fe2f81b6e21e204bb46da70ff7b970fe65c56f504e697fe6b41823ba679bd4111840482a83327d3432b8d670a684da4087ed074b @@ -6715,7 +6719,7 @@ fsevents@^1.2.7: languageName: node linkType: hard -"has-symbols@npm:^1.0.0, has-symbols@npm:^1.0.1, has-symbols@npm:^1.0.2": +"has-symbols@npm:^1.0.1, has-symbols@npm:^1.0.2": version: 1.0.2 resolution: "has-symbols@npm:1.0.2" checksum: 1b73928752fa9ca993fa48f7b3832c95ea408c0ec635b2d6cbaf011b94a7e6a704a9254ae6d8ecc913d4dd92f2ff760dc43aad7c7e790ddb3f627005614d8e28 @@ -6817,9 +6821,9 @@ fsevents@^1.2.7: linkType: hard "hosted-git-info@npm:^2.1.4": - version: 2.8.8 - resolution: "hosted-git-info@npm:2.8.8" - checksum: 3ecc389dc6ecbd5463fada7e04461e96f3c817fe2f989ca41e9dd3b503745a0bfa26fba405861b2831ca64edc1abc5d2fbc97ee977303f89650dac4fbfdc2d7a + version: 2.8.9 + resolution: "hosted-git-info@npm:2.8.9" + checksum: cf4dfac9b94aa601ae889e7e3cb5a7021a8517b517f933fec0b3a8dc5002edece01475c82f70cc18a051a5a8105bcb2fbe4e64f0b8f321eb99054a49a75b5aa3 languageName: node linkType: hard @@ -7217,13 +7221,6 @@ fsevents@^1.2.7: languageName: node linkType: hard -"indexes-of@npm:^1.0.1": - version: 1.0.1 - resolution: "indexes-of@npm:1.0.1" - checksum: e1c232a32631c709bb8a2188d0a53c02aae18904fff0165322a353dfd2985e0b3ea184b2b15b74acc363a0344dc6e8dc927b874935a738e8ce0e5253e4a9da98 - languageName: node - linkType: hard - "infer-owner@npm:^1.0.4": version: 1.0.4 resolution: "infer-owner@npm:1.0.4" @@ -7515,11 +7512,11 @@ fsevents@^1.2.7: linkType: hard "is-docker@npm:^2.0.0": - version: 2.1.1 - resolution: "is-docker@npm:2.1.1" + version: 2.2.1 + resolution: "is-docker@npm:2.2.1" bin: is-docker: cli.js - checksum: dc8e36fa63a246728e5dd4b3ab2d454f685d3dcc1fecbe62144a0c3bc1f5eef0cf67cb3af1b4a9d274dd18877b954b651c7ef0a483abae6a7a2baa8f987554ba + checksum: 7dbd6eecfe91984ef28ee80b13bd20ce4b27c1645542ae714a3976c881f7d166a3dcddb8b4f67c22285c4505f0b0e585a3b12feb4518b17f86b8a15b9f55c718 languageName: node linkType: hard @@ -7725,9 +7722,9 @@ fsevents@^1.2.7: linkType: hard "is-potential-custom-element-name@npm:^1.0.0": - version: 1.0.0 - resolution: "is-potential-custom-element-name@npm:1.0.0" - checksum: 55b1ae44cf9241ea5b08414318d12a4d2eb157cb5722908fc7ef268c6d175894cb59d298092a87f9ed54af5b60fc572fa7f6b34b8633120dbe6edaa6c5169d0b + version: 1.0.1 + resolution: "is-potential-custom-element-name@npm:1.0.1" + checksum: 25520ce8de393b87c8a2ce4d410c424d16baab0d5a43cbf76af148940725e489dbf3541a43371bcc0881fcb186d9a4ed18b774a11ac8743dd064303cea8de50d languageName: node linkType: hard @@ -8478,11 +8475,11 @@ fsevents@^1.2.7: linkType: hard "jsdom@npm:^16.4.0": - version: 16.5.1 - resolution: "jsdom@npm:16.5.1" + version: 16.5.3 + resolution: "jsdom@npm:16.5.3" dependencies: abab: ^2.0.5 - acorn: ^8.0.5 + acorn: ^8.1.0 acorn-globals: ^6.0.0 cssom: ^0.4.4 cssstyle: ^2.3.0 @@ -8504,7 +8501,7 @@ fsevents@^1.2.7: webidl-conversions: ^6.1.0 whatwg-encoding: ^1.0.5 whatwg-mimetype: ^2.3.0 - whatwg-url: ^8.0.0 + whatwg-url: ^8.5.0 ws: ^7.4.4 xml-name-validator: ^3.0.0 peerDependencies: @@ -8512,7 +8509,7 @@ fsevents@^1.2.7: peerDependenciesMeta: canvas: optional: true - checksum: 383d9aafff2a481b9668fcdd64ee6bb59977cce21844a588e2de07befaf897552d4141db6c2bed739dbbb714b2bcc2dd1a2fdb5196bff0676c2d43f18d1b0139 + checksum: 02f6e3b5bb6c75f70b256f9fb522ce67cdf035c8e073a61f152876570d29453f164a4f1ea38a62e419511f81f6f75ced793e6332b66a647dc8012daacff27b8e languageName: node linkType: hard @@ -9005,7 +9002,7 @@ fsevents@^1.2.7: languageName: node linkType: hard -"lodash@npm:4.x, lodash@npm:^4.17.11, lodash@npm:^4.17.14, lodash@npm:^4.17.15, lodash@npm:^4.17.19, lodash@npm:^4.17.20": +"lodash@npm:4.x, lodash@npm:^4.17.11, lodash@npm:^4.17.14, lodash@npm:^4.17.15, lodash@npm:^4.17.19, lodash@npm:^4.17.20, lodash@npm:^4.7.0": version: 4.17.21 resolution: "lodash@npm:4.17.21" checksum: 4983720b9abca930a4a46f18db163d7dad8dd00dbed6db0cc7b499b33b717cce69f80928b27bbb1ff2cbd3b19d251ee90669a8b5ea466072ca81c2ebe91e7468 @@ -9107,7 +9104,7 @@ fsevents@^1.2.7: languageName: node linkType: hard -"make-fetch-happen@npm:^8.0.9": +"make-fetch-happen@npm:^8.0.14, make-fetch-happen@npm:^8.0.9": version: 8.0.14 resolution: "make-fetch-happen@npm:8.0.14" dependencies: @@ -9278,28 +9275,28 @@ fsevents@^1.2.7: linkType: hard "micromatch@npm:^4.0.0, micromatch@npm:^4.0.2": - version: 4.0.2 - resolution: "micromatch@npm:4.0.2" + version: 4.0.4 + resolution: "micromatch@npm:4.0.4" dependencies: braces: ^3.0.1 - picomatch: ^2.0.5 - checksum: 0cb0e11d647cbb65e398a0a8a1340a7fb751ae2722346219c435704cfac8b3275a94a6464236fe867f52ad46a24046d3bc4ac11b3d21ddb73bc44e27cf1e4904 + picomatch: ^2.2.3 + checksum: bc522ad93c086aa176f50fea2dc8060a8f7d7a621c811cf9ba02a1912577cc100190508166d721231465f10a575a40ec8a1bffc23bbc2c0108fcbf02e4be04ed languageName: node linkType: hard -"mime-db@npm:1.46.0, mime-db@npm:>= 1.43.0 < 2": - version: 1.46.0 - resolution: "mime-db@npm:1.46.0" - checksum: 4e137ac502ca5ba6c583e552c5fa6abd0c2157592f647824ba7246b771eb42c65c2a1816fc52b27afdbb88a026127f1d5fba354f9dcde591b3b464be07c3d27e +"mime-db@npm:1.47.0, mime-db@npm:>= 1.43.0 < 2": + version: 1.47.0 + resolution: "mime-db@npm:1.47.0" + checksum: f5f9220dd53c240c9234323571f632486c663e36676ebfdca9963fb9a92d1dd28b16124bceff60868fb70743764ade8466dd5e6a1a833decde89ae6d15211503 languageName: node linkType: hard "mime-types@npm:^2.1.12, mime-types@npm:^2.1.27, mime-types@npm:~2.1.17, mime-types@npm:~2.1.19, mime-types@npm:~2.1.24": - version: 2.1.29 - resolution: "mime-types@npm:2.1.29" + version: 2.1.30 + resolution: "mime-types@npm:2.1.30" dependencies: - mime-db: 1.46.0 - checksum: 744d72b2a24c64d2aacc1ead86bfc827c2c4f1bb6f3b4bf6d8684b82f5ddd0b75a5c0eff128a888c09080f9ad7979400b64a697889690fca3c42de80c8f5e187 + mime-db: 1.47.0 + checksum: c7ca8a9980bdae0b760820aded39ea9541a8236f4abc105df645ea5b09a9c4a5299e28667c0c9596ab8e4ca84b219fd8b94b5c68e32b59891ca1f57a7e848c02 languageName: node linkType: hard @@ -9537,7 +9534,7 @@ fsevents@^1.2.7: languageName: node linkType: hard -"nanoid@npm:^3.1.20": +"nanoid@npm:^3.1.22": version: 3.1.22 resolution: "nanoid@npm:3.1.22" bin: @@ -9744,22 +9741,22 @@ fsevents@^1.2.7: linkType: hard "node-gyp@npm:latest": - version: 7.1.2 - resolution: "node-gyp@npm:7.1.2" + version: 8.0.0 + resolution: "node-gyp@npm:8.0.0" dependencies: env-paths: ^2.2.0 glob: ^7.1.4 - graceful-fs: ^4.2.3 + graceful-fs: ^4.2.6 + make-fetch-happen: ^8.0.14 nopt: ^5.0.0 npmlog: ^4.1.2 - request: ^2.88.2 rimraf: ^3.0.2 - semver: ^7.3.2 - tar: ^6.0.2 + semver: ^7.3.5 + tar: ^6.1.0 which: ^2.0.2 bin: node-gyp: bin/node-gyp.js - checksum: fca9ecb1be01f707b76c2aec01f0f2ef4ff45c4e24df378c01a4a2c93b4a8172b47ad59f07af91c54a797a8a77fc72e087e29a97a52c892df507245530c46bfa + checksum: 604a48ca1ee0277a960f4d71a05cea2e9a20007a4cdf7953caec78d26acc4bba765d3a97c649953a2de505de67a1b26f0c8c7c81124c591c81de5659f359adce languageName: node linkType: hard @@ -9791,7 +9788,7 @@ fsevents@^1.2.7: languageName: node linkType: hard -"node-releases@npm:^1.1.70": +"node-releases@npm:^1.1.71": version: 1.1.71 resolution: "node-releases@npm:1.1.71" checksum: 9e283003f1deafd0ca7f9bbde9c4b5b05d880ca165217f5227b37406626d6689a246a5c4c72f9a8512be65cd51b13cc7d0f5d8bc68ad36089b620f1810292340 @@ -10002,9 +9999,9 @@ fsevents@^1.2.7: linkType: hard "object-inspect@npm:^1.9.0": - version: 1.9.0 - resolution: "object-inspect@npm:1.9.0" - checksum: 63b412167d716e332b3233090a9e8cc7951479a6971629fb8a3d00135a2329136c697fbd2f56e48bb132928f01bd0f8c5fe2d7386222f217228ca697b8c3932a + version: 1.10.2 + resolution: "object-inspect@npm:1.10.2" + checksum: 2bb89d63fde8e5dc8ee255aa783308477c614204a12b5568e4646a3032fd75600ead57769f3e0557c7fed51ab4fe4f54f6998b77a0832c3e5b61974d67f3f705 languageName: node linkType: hard @@ -10177,13 +10174,13 @@ fsevents@^1.2.7: languageName: node linkType: hard -"optimism@npm:^0.14.0": - version: 0.14.1 - resolution: "optimism@npm:0.14.1" +"optimism@npm:^0.15.0": + version: 0.15.0 + resolution: "optimism@npm:0.15.0" dependencies: - "@wry/context": ^0.5.2 - "@wry/trie": ^0.2.1 - checksum: 6fe9cf1d8ea72acee3d33d986b14b84ee610f1c934866827160cdead5a23b72f345f54288ec44a909021166fc9dd5ce47c3c7bae7798f78651c6d2c69bf176df + "@wry/context": ^0.6.0 + "@wry/trie": ^0.3.0 + checksum: a9152e33a27be9b2b4a441387061a7e8aff9877872169eba49c11c07fee19b7369efd48f7530f5a65e142f46b63ba3c8a56c9b893eaa696e143f1fdff33760a2 languageName: node linkType: hard @@ -10558,10 +10555,10 @@ fsevents@^1.2.7: languageName: node linkType: hard -"picomatch@npm:^2.0.4, picomatch@npm:^2.0.5, picomatch@npm:^2.2.1": - version: 2.2.2 - resolution: "picomatch@npm:2.2.2" - checksum: 20fa75e0a58b39d83425b3db68744d5f6f361fd4fd66ec7745d884036d502abba0d553a637703af79939b844164b13e60eea339ccb043d7fbd74c3da2592b864 +"picomatch@npm:^2.0.4, picomatch@npm:^2.2.1, picomatch@npm:^2.2.3": + version: 2.2.3 + resolution: "picomatch@npm:2.2.3" + checksum: f8c9323bc3b21ff448e81dd32277135d781abae5d53a1415d69a4ce6317a2c11404d449c550110b8fa402c07d5e80ff0e2657f263a312517cc809e9010d25791 languageName: node linkType: hard @@ -10735,14 +10732,12 @@ fsevents@^1.2.7: linkType: hard "postcss-selector-parser@npm:^6.0.2, postcss-selector-parser@npm:^6.0.4": - version: 6.0.4 - resolution: "postcss-selector-parser@npm:6.0.4" + version: 6.0.5 + resolution: "postcss-selector-parser@npm:6.0.5" dependencies: cssesc: ^3.0.0 - indexes-of: ^1.0.1 - uniq: ^1.0.1 util-deprecate: ^1.0.2 - checksum: f6b6e30f515e0909af2555df29feca42f2141d10fac7f8e719ac72f071729a9b9f631241bb1d8ff88cbec7e8fb2ada22c0c92ee0d629582340551ea090985a74 + checksum: 24343ba437574807988c34f5f7724bd68ff2103d55c78dfe4a6d8904eeddcbc867a7f939658c0669338a322e32f4f1d7df82618d6edfe2db38dcd3fda737d770 languageName: node linkType: hard @@ -10754,13 +10749,13 @@ fsevents@^1.2.7: linkType: hard "postcss@npm:^8.1.4": - version: 8.2.8 - resolution: "postcss@npm:8.2.8" + version: 8.2.10 + resolution: "postcss@npm:8.2.10" dependencies: colorette: ^1.2.2 - nanoid: ^3.1.20 + nanoid: ^3.1.22 source-map: ^0.6.1 - checksum: 6e17d28833cf918a5ab306bfc7ec66b236dc51ed0f3de959491d40f6a171f5bd5f26de12f74e6bfeebaad44b0ac92b9f477a669d5f1fc07a27d67d8147a4bf6f + checksum: 83912f846376ceb501d887951bb3c7f5efc16452b124ba5ffbdd27f718dabd1edce8f6ef777a88aeb93366081cc2a3804581b2e6711a1e89ecaecb0dff2d2b73 languageName: node linkType: hard @@ -10869,12 +10864,12 @@ fsevents@^1.2.7: linkType: hard "prompts@npm:^2.0.1": - version: 2.4.0 - resolution: "prompts@npm:2.4.0" + version: 2.4.1 + resolution: "prompts@npm:2.4.1" dependencies: kleur: ^3.0.3 sisteransi: ^1.0.5 - checksum: fd375679ad53bb6a85ac1edf6d3f48b4a120a9aac87d3f0e50756c02013f1e9ee835f10ba18edc2f21048cf8423a986aff8f75ee42f03ce1ebf1d1c65f5ef3cf + checksum: 705eae8c359edd7c5ba47404ef349d239334ebde0f55420588dd98449c52b38e35b52800ef55ad5804bb8c3b98b3b834beb749813f89e896d058ee18aa0d6c2c languageName: node linkType: hard @@ -11346,9 +11341,9 @@ fsevents@^1.2.7: linkType: hard "regenerator-runtime@npm:^0.13.4": - version: 0.13.7 - resolution: "regenerator-runtime@npm:0.13.7" - checksum: 6ef567c662088b1b292214920cbd72443059298d477f72e1a37e0a113bafbfac9057cbfe35ae617284effc4b423493326a78561bbff7b04162c7949bdb9624e8 + version: 0.13.8 + resolution: "regenerator-runtime@npm:0.13.8" + checksum: 20178f5753f181d59691e5c3b4c59a2769987f75c7ccf325777673b5478acca61a553b10e895585086c222f72f5ee428090acf50320264de4b79f630f7388653 languageName: node linkType: hard @@ -11434,9 +11429,9 @@ fsevents@^1.2.7: linkType: hard "repeat-element@npm:^1.1.2": - version: 1.1.3 - resolution: "repeat-element@npm:1.1.3" - checksum: 6a59b879efdd3512a786be5de1bc05c110822fec6820bb5a38dfdfdd4488e7ba0cf6d15b28da21544e6f072ae60762ee9efa784f2988128e656c97a8b0be46cb + version: 1.1.4 + resolution: "repeat-element@npm:1.1.4" + checksum: 44db9550826d4101f1db2deccd1afe226e77a137c94b899b98505409703513894ef5195fcd0fccb9f0979f3ab7d582cac7c19ff4cf8b606c2f0754488e164c70 languageName: node linkType: hard @@ -11703,11 +11698,11 @@ resolve@^2.0.0-next.3: linkType: hard "rxjs@npm:^6.6.2, rxjs@npm:^6.6.3": - version: 6.6.6 - resolution: "rxjs@npm:6.6.6" + version: 6.6.7 + resolution: "rxjs@npm:6.6.7" dependencies: tslib: ^1.9.0 - checksum: c97b410e791b3259439be48cd37119b63eedc3809a5895d884a7ac27a6934ae4ec246be3d76f1b2f3b47c72a96500ad30977545dc8b0f4a0f98c52f5f773a8ea + checksum: 1146975cbd5388ee5e61450235dc5670931e43cce71813f567977d334acc4d75c6e8d9d293df67e1fb31510b99fc8957943d4a9b550d109e4dc69967a8471543 languageName: node linkType: hard @@ -11849,7 +11844,7 @@ resolve@^2.0.0-next.3: languageName: node linkType: hard -"semver@npm:7.3.5, semver@npm:7.x, semver@npm:^7.2.1, semver@npm:^7.3.2, semver@npm:^7.3.4": +"semver@npm:7.3.5, semver@npm:7.x, semver@npm:^7.2.1, semver@npm:^7.3.2, semver@npm:^7.3.4, semver@npm:^7.3.5": version: 7.3.5 resolution: "semver@npm:7.3.5" dependencies: @@ -12198,12 +12193,12 @@ resolve@^2.0.0-next.3: linkType: hard "socks@npm:^2.3.3": - version: 2.6.0 - resolution: "socks@npm:2.6.0" + version: 2.6.1 + resolution: "socks@npm:2.6.1" dependencies: ip: ^1.1.5 smart-buffer: ^4.1.0 - checksum: f670b49b2931d1388c1fcf292af9bbd3e607eefb40b1cde762a43ca7475a15f3c14aab9418de71b8ff2e65a8174e5e22392fbbbd01610885cd56722deae4380e + checksum: 9a5735cf9be6f756006b4c5ed23f17c15ffbfc0afb04b5d1b49516b7a27818c807a6a5b5419a65a140a1964149ec9ebb6cd8f0e06d7c60282912204d781371db languageName: node linkType: hard @@ -12703,12 +12698,12 @@ resolve@^2.0.0-next.3: linkType: hard "supports-hyperlinks@npm:^2.0.0": - version: 2.1.0 - resolution: "supports-hyperlinks@npm:2.1.0" + version: 2.2.0 + resolution: "supports-hyperlinks@npm:2.2.0" dependencies: has-flag: ^4.0.0 supports-color: ^7.0.0 - checksum: 8b3b6d71ee298d7f9a3ff4bfb928bd037c0b691b01bdfebb77deb3384976cd78c180d564dc3689ce5fe254d323252f7064efa1364bf24ab81efa6b080e51eddb + checksum: 91af5f206c55fe38c5acacafca8e13bee8ddf59f817178d3cb83388bd85d3ec181a59c446439b63aafa0375e579a7e8d8ec044a0ed1143137ba12f303eb76c6a languageName: node linkType: hard @@ -13026,14 +13021,12 @@ resolve@^2.0.0-next.3: languageName: node linkType: hard -"ts-invariant@npm:^0.6.2": - version: 0.6.2 - resolution: "ts-invariant@npm:0.6.2" +"ts-invariant@npm:^0.7.0": + version: 0.7.3 + resolution: "ts-invariant@npm:0.7.3" dependencies: - "@types/ungap__global-this": ^0.3.1 - "@ungap/global-this": ^0.4.2 - tslib: ^1.9.3 - checksum: 64230c18f04ea17ca9b1222647372202c12be4a45e5c23cff308cace9ad45384f52faaa0cb93aec0b24d82e85e11e2dd77816bf626684ffa3a90d27c420a0727 + tslib: ^2.1.0 + checksum: 2fef71589aba75dbde8aa82a8add90dbc356e741452181850cef32903374e4ca451e4bc063ea77d564296287659e465f2c2d639c0d44449fd64467348d37dd71 languageName: node linkType: hard @@ -13085,8 +13078,8 @@ resolve@^2.0.0-next.3: linkType: hard "ts-jest@npm:^26.5.4": - version: 26.5.4 - resolution: "ts-jest@npm:26.5.4" + version: 26.5.5 + resolution: "ts-jest@npm:26.5.5" dependencies: bs-logger: 0.x buffer-from: 1.x @@ -13103,7 +13096,7 @@ resolve@^2.0.0-next.3: typescript: ">=3.8 <5.0" bin: ts-jest: cli.js - checksum: 8e5856b7cb990ff4cbc9577e4ec2a1135da9747e41dbf128e03ffa631dd0fdce402780a87318d28114174faa80ccdd0875b2c312b86c07a4537531c517f79101 + checksum: a7fe56357bfd7e7cd833ea4a97408910ee67796fb7f3938c7155c69dc7b35f3172b76503e16282715e07a4a2b5026efd4803f0b090b3930e0c79c58d25b740db languageName: node linkType: hard @@ -13156,17 +13149,17 @@ resolve@^2.0.0-next.3: languageName: node linkType: hard -"tslib@npm:^1.10.0, tslib@npm:^1.14.1, tslib@npm:^1.8.1, tslib@npm:^1.9.0, tslib@npm:^1.9.3": +"tslib@npm:^1.10.0, tslib@npm:^1.8.1, tslib@npm:^1.9.0, tslib@npm:^1.9.3": version: 1.14.1 resolution: "tslib@npm:1.14.1" checksum: f44fe7f216946b17d3e3074df3746372703cf24e9127b4c045511456e8e4bf25515fb0a1bb3937676cc305651c5d4fcb6377b0588a4c6a957e748c4c28905d17 languageName: node linkType: hard -"tslib@npm:^2.0.1, tslib@npm:^2.0.3, tslib@npm:^2.1.0, tslib@npm:~2.1.0": - version: 2.1.0 - resolution: "tslib@npm:2.1.0" - checksum: d8f5bdd067611651c6b846c2388f4dc8ba1f5af124e66105f5263d1ad56da17f4b8c6566887ca2f205c5a9758451871ceca87d5d06087af2dca1699c5e33db69 +"tslib@npm:^2.0.1, tslib@npm:^2.0.3, tslib@npm:^2.1.0, tslib@npm:~2.2.0": + version: 2.2.0 + resolution: "tslib@npm:2.2.0" + checksum: 2d35468c470410871c5246e43f12dcb6d0fc363b617c176f26443b9530e5c5ee8448966892a42956168d8f495da7865bda33dfe82c26c91991e28999974a618f languageName: node linkType: hard @@ -13177,10 +13170,10 @@ resolve@^2.0.0-next.3: languageName: node linkType: hard -"tslib@npm:~2.2.0": - version: 2.2.0 - resolution: "tslib@npm:2.2.0" - checksum: 2d35468c470410871c5246e43f12dcb6d0fc363b617c176f26443b9530e5c5ee8448966892a42956168d8f495da7865bda33dfe82c26c91991e28999974a618f +"tslib@npm:~2.1.0": + version: 2.1.0 + resolution: "tslib@npm:2.1.0" + checksum: d8f5bdd067611651c6b846c2388f4dc8ba1f5af124e66105f5263d1ad56da17f4b8c6566887ca2f205c5a9758451871ceca87d5d06087af2dca1699c5e33db69 languageName: node linkType: hard @@ -13236,10 +13229,10 @@ resolve@^2.0.0-next.3: languageName: node linkType: hard -"type-fest@npm:^0.11.0": - version: 0.11.0 - resolution: "type-fest@npm:0.11.0" - checksum: 02e5cadf13590a5724cacf8d9133320efd173f6fb1b695fcb29e56551a315bf0f07ca988a780a1999b7b55bb3eaaa7f37223615207236d393af17bba6749dc95 +"type-fest@npm:^0.21.3": + version: 0.21.3 + resolution: "type-fest@npm:0.21.3" + checksum: bbe5f5c60e8da4e0b0fe290c31821b10c2fd935768802cd659784cb5e792c7a31bb25a89174d3b42dde3bf8eb9d301ede7456a274c1068280b7698438e250f49 languageName: node linkType: hard @@ -13317,14 +13310,14 @@ typescript@4.1.3: linkType: hard "unbox-primitive@npm:^1.0.0": - version: 1.0.0 - resolution: "unbox-primitive@npm:1.0.0" + version: 1.0.1 + resolution: "unbox-primitive@npm:1.0.1" dependencies: function-bind: ^1.1.1 - has-bigints: ^1.0.0 - has-symbols: ^1.0.0 - which-boxed-primitive: ^1.0.1 - checksum: 25e82f99bb40981f30615644305c757ecefff43d2ef2ac1b80e24f304f3002cd637eecb672bdd07f5fb858a265d96a4b2e983c714cba65498715acf7af23e86b + has-bigints: ^1.0.1 + has-symbols: ^1.0.2 + which-boxed-primitive: ^1.0.2 + checksum: aa944f1ecfec638b841b331383d0b80edc40855271ecc213c1aa736096d8d0b39ba25b64d102f56c597521db9cd3f0ddbcb97a0f760c240ab584e94e457518c1 languageName: node linkType: hard @@ -13377,13 +13370,6 @@ typescript@4.1.3: languageName: node linkType: hard -"uniq@npm:^1.0.1": - version: 1.0.1 - resolution: "uniq@npm:1.0.1" - checksum: a5603a5b3128616f268e7695e47cd1eb8d583cf8ee1278434140cd83d2f3f98e5d65a22cf4187f0345ca8d8a0a9f1d07e1f06cb46312135ad4a6303fd28fc317 - languageName: node - linkType: hard - "unique-filename@npm:^1.1.1": version: 1.1.1 resolution: "unique-filename@npm:1.1.1" @@ -13638,13 +13624,13 @@ typescript@4.1.3: linkType: hard "v8-to-istanbul@npm:^7.0.0": - version: 7.1.0 - resolution: "v8-to-istanbul@npm:7.1.0" + version: 7.1.1 + resolution: "v8-to-istanbul@npm:7.1.1" dependencies: "@types/istanbul-lib-coverage": ^2.0.1 convert-source-map: ^1.6.0 source-map: ^0.7.3 - checksum: decc2cc896de173adc27e5621f3d7e5d0d4018d6df12cc95c5de2d8eb1a1bab2ed4fe9a4e767dd469b81b3520024b9fec6b9b4beeefbfac2bbeebfc9937bf9ba + checksum: 12aad5bcaf3bdc9587eac86299313b677c53f3ad4c4663067d7ee456fb4c606b3abfef0b7d67b4a604b7f270e1ad4c00d31d1c6183d1cf023f348cff4f922e40 languageName: node linkType: hard @@ -13993,18 +13979,18 @@ typescript@4.1.3: languageName: node linkType: hard -"whatwg-url@npm:^8.0.0": - version: 8.4.0 - resolution: "whatwg-url@npm:8.4.0" +"whatwg-url@npm:^8.0.0, whatwg-url@npm:^8.5.0": + version: 8.5.0 + resolution: "whatwg-url@npm:8.5.0" dependencies: - lodash.sortby: ^4.7.0 + lodash: ^4.7.0 tr46: ^2.0.2 webidl-conversions: ^6.1.0 - checksum: c85dfbedd2554e76d05eba467509db3a0ed5740e3bf1069a10ca302da531d64399693e4952c61be67d119a6b7f634f3ff65fbe59555b30474f849a7e0ce2a4c6 + checksum: a070c4be45bd09e9f1593d678e798fb66cd2cbccd2a604a7453063c68ab4bb80b4a9e2a0a80562264e5963eb589311c6467599fdac9fb6a4112cd786397920e4 languageName: node linkType: hard -"which-boxed-primitive@npm:^1.0.1": +"which-boxed-primitive@npm:^1.0.1, which-boxed-primitive@npm:^1.0.2": version: 1.0.2 resolution: "which-boxed-primitive@npm:1.0.2" dependencies: @@ -14199,8 +14185,8 @@ typescript@4.1.3: linkType: hard "ws@npm:^7.4.4": - version: 7.4.4 - resolution: "ws@npm:7.4.4" + version: 7.4.5 + resolution: "ws@npm:7.4.5" peerDependencies: bufferutil: ^4.0.1 utf-8-validate: ^5.0.2 @@ -14209,7 +14195,7 @@ typescript@4.1.3: optional: true utf-8-validate: optional: true - checksum: ad08761ed753cdd3f7172e9a9efc7d74e7e196623cace2380e5f74ff0abd16196e03223bd4148a34278dcbc653ee3841994635419281cbf303b3f22c589e2ec4 + checksum: 20731aa1075336b94677f6741b674469c3c7fce9b70115bb535827c7c108a9d714f0b38ce39289b63c652870f9801afaf096f8aab32da96be62d919e80e4ed32 languageName: node linkType: hard @@ -14254,16 +14240,16 @@ typescript@4.1.3: linkType: hard "y18n@npm:^4.0.0": - version: 4.0.1 - resolution: "y18n@npm:4.0.1" - checksum: e589620d8d668d696e74730a83731a36a8d782c50379386b142e5b8287388a6ebaf28528e84201c68c206629faed71362c79b201b398eb0c69aa1737635678dd + version: 4.0.3 + resolution: "y18n@npm:4.0.3" + checksum: e6d08e9d148e71d620acbca1c10f4db86a3a960527a47e8fbe732ea8246076d0a54e1f6adf0f8f8fdeacb87c23dea52382f4243bf736d36c83bb7f2ee0ea7fcd languageName: node linkType: hard "y18n@npm:^5.0.5": - version: 5.0.5 - resolution: "y18n@npm:5.0.5" - checksum: a7d41b0cccca1c98ebab270a944df48eb3b5352d3be0affb8afc8369823f6aa97a5fbead2c5b35e59a5650cb786b2b37627b45be5ff31f02a80dd3b881aceb17 + version: 5.0.8 + resolution: "y18n@npm:5.0.8" + checksum: 56275bfa72a8a585c4d2905b086862fb881dfe7871adcefe4ecf4c1a6a78c6389b459b427c0a8672ccdb09731a78143acc71f0bcc8dc8d8427869fafe7f18b95 languageName: node linkType: hard From f6c5285fcc703ad5f8627ed1392d9c93ff97e8d7 Mon Sep 17 00:00:00 2001 From: Daniel Starns Date: Thu, 22 Apr 2021 12:46:57 +0100 Subject: [PATCH 3/5] Fix/add-correct-scalars-to-validation (#166) * config: eslint disable a silly rule and remove some unmaintainable comments * package/dev: add neo4j-driver to ogm * refactor/fix: change to use makeExecutableSchema type and nest stuff inside config obj * docs: update to reflect config obj * refactor: consts at the top * fix: export type * docs: update readmes for new config key * package: update graphql tools and compose deps * refactor: change to config obj and move driver and debug back to the top level * refactor: change to config object over envs * fix: process.env removal of config * test/refactor: remove raw jwt creation * config: fix broken tsconfig json * test: fix broken type * fix: issue #158 add all scalars to schema * refactor: PR requests * docs: add pesudo optional flag --- .../src/schema/make-augmented-schema.test.ts | 23 +++++++++++++++++++ .../graphql/src/schema/validation/index.ts | 4 +++- 2 files changed, 26 insertions(+), 1 deletion(-) diff --git a/packages/graphql/src/schema/make-augmented-schema.test.ts b/packages/graphql/src/schema/make-augmented-schema.test.ts index dbd1f62199..4e230da157 100644 --- a/packages/graphql/src/schema/make-augmented-schema.test.ts +++ b/packages/graphql/src/schema/make-augmented-schema.test.ts @@ -223,4 +223,27 @@ describe("makeAugmentedSchema", () => { expect(matchesField).not.toBeUndefined(); }); }); + + describe("issues", () => { + test("158", () => { + // https://github.com/neo4j/graphql/issues/158 + + const typeDefs = ` + type Node { + createdAt: DateTime + } + + type Query { + nodes: [Node] @cypher(statement: "") + } + `; + + const neoSchema = makeAugmentedSchema({ typeDefs }); + + const document = parse(printSchema(neoSchema.schema)); + + // make sure the schema constructs + expect(document.kind).toEqual("Document"); + }); + }); }); diff --git a/packages/graphql/src/schema/validation/index.ts b/packages/graphql/src/schema/validation/index.ts index 47595401d9..f1e1351839 100644 --- a/packages/graphql/src/schema/validation/index.ts +++ b/packages/graphql/src/schema/validation/index.ts @@ -20,7 +20,8 @@ import { DefinitionNode, DocumentNode, print } from "graphql"; import { makeExecutableSchema } from "@graphql-tools/schema"; import { SchemaComposer, printDirective, printEnum, printScalar } from "graphql-compose"; -import * as scalars from "./scalars"; +import * as scalars from "../scalars"; +import { ScalarType } from "./scalars"; import * as enums from "./enums"; import * as directives from "./directives"; @@ -51,6 +52,7 @@ function validateSchema(document: DocumentNode): void { const composer = new SchemaComposer(); const doc = print(filterDocument(document)); + composer.addTypeDefs(printScalar(ScalarType)); Object.values(scalars).forEach((scalar) => { composer.addTypeDefs(printScalar(scalar)); }); From aa5815b4973729c66477fd9043e2495b74b3275c Mon Sep 17 00:00:00 2001 From: Oskar Hane Date: Mon, 26 Apr 2021 14:19:38 +0200 Subject: [PATCH 4/5] Remove `files` field in package.json + npmignore scripts/ --- packages/graphql/.npmignore | 1 + packages/graphql/package.json | 3 --- packages/ogm/.npmignore | 3 ++- packages/ogm/package.json | 3 --- 4 files changed, 3 insertions(+), 7 deletions(-) diff --git a/packages/graphql/.npmignore b/packages/graphql/.npmignore index 9eb3d172b9..b9eaa82743 100644 --- a/packages/graphql/.npmignore +++ b/packages/graphql/.npmignore @@ -1,5 +1,6 @@ src/ tests/ +scripts/ .npmrc .npmignore jest.config.js diff --git a/packages/graphql/package.json b/packages/graphql/package.json index ca7e74dc70..66e90d0141 100644 --- a/packages/graphql/package.json +++ b/packages/graphql/package.json @@ -15,9 +15,6 @@ "exports": "./dist/index.js", "main": "./dist/index.js", "types": "./dist/index.d.ts", - "files": [ - "dist/" - ], "scripts": { "clean": "cd src/ && tsc --build --clean", "test": "jest", diff --git a/packages/ogm/.npmignore b/packages/ogm/.npmignore index e1309ebe26..b9eaa82743 100644 --- a/packages/ogm/.npmignore +++ b/packages/ogm/.npmignore @@ -1,7 +1,8 @@ src/ tests/ +scripts/ .npmrc .npmignore jest.config.js tsconfig.json -dist/tsconfig.tsbuildinfo \ No newline at end of file +dist/tsconfig.tsbuildinfo diff --git a/packages/ogm/package.json b/packages/ogm/package.json index 24e674db53..90d99bbd1a 100644 --- a/packages/ogm/package.json +++ b/packages/ogm/package.json @@ -17,9 +17,6 @@ }, "main": "./dist/index.js", "types": "./dist/index.d.ts", - "files": [ - "dist/" - ], "scripts": { "build": "tsc --project src/", "test": "jest", From 8a0dbeb21e9b46495c8803dcda2e891a96ed4fca Mon Sep 17 00:00:00 2001 From: Neo Technology Build Agent Date: Mon, 26 Apr 2021 15:15:19 +0000 Subject: [PATCH 5/5] Version update --- packages/graphql/package.json | 2 +- packages/ogm/package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/graphql/package.json b/packages/graphql/package.json index 66e90d0141..7beaec2897 100644 --- a/packages/graphql/package.json +++ b/packages/graphql/package.json @@ -1,6 +1,6 @@ { "name": "@neo4j/graphql", - "version": "1.0.0-beta.2", + "version": "1.0.0-beta.3", "description": "A GraphQL to Cypher query execution layer for Neo4j and JavaScript GraphQL implementations", "keywords": [ "neo4j", diff --git a/packages/ogm/package.json b/packages/ogm/package.json index 90d99bbd1a..3b27b5cbf0 100644 --- a/packages/ogm/package.json +++ b/packages/ogm/package.json @@ -1,6 +1,6 @@ { "name": "@neo4j/graphql-ogm", - "version": "1.0.0-beta.2", + "version": "1.0.0-beta.3", "description": "GraphQL powered OGM for Neo4j and Javascript applications", "keywords": [ "neo4j",