Skip to content

Commit

Permalink
fix(deps): update all non-major dependencies (#7491)
Browse files Browse the repository at this point in the history
* fix(deps): update all non-major dependencies

* chore(dependencies): updated changesets for modified dependencies

* Fix tests

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Arda TANRIKULU <[email protected]>
  • Loading branch information
3 people authored Aug 12, 2024
1 parent 086a5ea commit 9eead57
Show file tree
Hide file tree
Showing 20 changed files with 102 additions and 52 deletions.
5 changes: 5 additions & 0 deletions .changeset/@graphql-mesh_merger-bare-7491-dependencies.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@graphql-mesh/merger-bare": patch
---
dependencies updates:
- Updated dependency [`@graphql-tools/[email protected]` ↗︎](https://www.npmjs.com/package/@graphql-tools/schema/v/10.0.5) (from `10.0.4`, in `dependencies`)
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ type Query @extraSchemaDefinitionDirective(
path: "/users/{args.id}"
operationSpecificHeaders: [["accept", "application/json"]]
httpMethod: GET
) @merge(subgraph: "accounts", keyArg: "id", keyField: "id") @join__field(graph: ACCOUNTS)
) @merge(subgraph: "accounts", keyField: "id", keyArg: "id") @join__field(graph: ACCOUNTS)
users: [User] @httpOperation(
subgraph: "accounts"
path: "/users"
Expand Down
12 changes: 6 additions & 6 deletions e2e/neo4j-example/__snapshots__/neo4j-example.test.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ enum join__Graph {
directive @relationshipProperties on OBJECT
directive @relationship(type: String, direction: _RelationDirections) on FIELD_DEFINITION
directive @relationship(type: String, direction: _RelationDirections, properties: String) on FIELD_DEFINITION
directive @introspection(subgraph: String) repeatable on ENUM | OBJECT | INTERFACE | UNION | INPUT_OBJECT | FIELD_DEFINITION | SCALAR | ENUM_VALUE | INPUT_FIELD_DEFINITION
Expand All @@ -104,7 +104,7 @@ scalar Any @join__type(graph: MOVIES)
scalar _DirectiveExtensions @join__type(graph: MOVIES)
type Query @extraSchemaDefinitionDirective(
directives: {transport: [{kind: "neo4j", subgraph: "Movies", location: "neo4j://0.0.0.0:<neo4j_port>", options: {database: "neo4j", auth: {type: "basic", username: "neo4j", password: "password"}}}, {kind: "neo4j", subgraph: "Movies", location: "neo4j://0.0.0.0:<neo4j_port>", options: {database: "neo4j", auth: {type: "basic", username: "neo4j", password: "password"}}}, {kind: "neo4j", subgraph: "Movies", location: "neo4j://0.0.0.0:<neo4j_port>", options: {database: "neo4j", auth: {type: "basic", username: "neo4j", password: "password"}}}, {kind: "neo4j", subgraph: "Movies", location: "neo4j://0.0.0.0:<neo4j_port>", options: {database: "neo4j", auth: {type: "basic", username: "neo4j", password: "password"}}}, {kind: "neo4j", subgraph: "Movies", location: "neo4j://0.0.0.0:<neo4j_port>", options: {database: "neo4j", auth: {type: "basic", username: "neo4j", password: "password"}}}, {kind: "neo4j", subgraph: "Movies", location: "neo4j://0.0.0.0:<neo4j_port>", options: {database: "neo4j", auth: {type: "basic", username: "neo4j", password: "password"}}}]}
directives: {transport: [{kind: "neo4j", subgraph: "Movies", location: "neo4j://0.0.0.0:<neo4j_port>", options: {database: "neo4j", auth: {type: "basic", username: "neo4j", password: "password"}}}]}
) @join__type(graph: MOVIES) {
movies(where: MovieWhere, options: MovieOptions) : [Movie!]!
moviesConnection(first: Int, after: String, where: MovieWhere, sort: [MovieSort]) : MoviesConnection!
Expand Down Expand Up @@ -190,7 +190,7 @@ type Movie @introspection @join__type(graph: MOVIES) {
tagline: String @introspection
title: String! @introspection
peopleActedInAggregate(where: PersonWhere, directed: Boolean = true) : MoviePersonPeopleActedInAggregationSelection
peopleActedIn(where: PersonWhere, options: PersonOptions, directed: Boolean = true) : [Person!]! @introspection @relationship(type: "ACTED_IN", direction: IN)
peopleActedIn(where: PersonWhere, options: PersonOptions, directed: Boolean = true) : [Person!]! @introspection @relationship(type: "ACTED_IN", direction: IN, properties: "ActedInProperties")
peopleActedInConnection(
where: MoviePeopleActedInConnectionWhere
first: Int
Expand All @@ -217,7 +217,7 @@ type Movie @introspection @join__type(graph: MOVIES) {
sort: [MoviePeopleProducedConnectionSort!]
): MoviePeopleProducedConnection!
peopleReviewedAggregate(where: PersonWhere, directed: Boolean = true) : MoviePersonPeopleReviewedAggregationSelection
peopleReviewed(where: PersonWhere, options: PersonOptions, directed: Boolean = true) : [Person!]! @introspection @relationship(type: "REVIEWED", direction: IN)
peopleReviewed(where: PersonWhere, options: PersonOptions, directed: Boolean = true) : [Person!]! @introspection @relationship(type: "REVIEWED", direction: IN, properties: "ReviewedProperties")
peopleReviewedConnection(
where: MoviePeopleReviewedConnectionWhere
first: Int
Expand Down Expand Up @@ -387,7 +387,7 @@ type Person @introspection @join__type(graph: MOVIES) {
born: BigInt @introspection
name: String! @introspection
actedInMoviesAggregate(where: MovieWhere, directed: Boolean = true) : PersonMovieActedInMoviesAggregationSelection
actedInMovies(where: MovieWhere, options: MovieOptions, directed: Boolean = true) : [Movie!]! @introspection @relationship(type: "ACTED_IN", direction: OUT)
actedInMovies(where: MovieWhere, options: MovieOptions, directed: Boolean = true) : [Movie!]! @introspection @relationship(type: "ACTED_IN", direction: OUT, properties: "ActedInProperties")
actedInMoviesConnection(
where: PersonActedInMoviesConnectionWhere
first: Int
Expand Down Expand Up @@ -432,7 +432,7 @@ type Person @introspection @join__type(graph: MOVIES) {
sort: [PersonProducedMoviesConnectionSort!]
): PersonProducedMoviesConnection!
reviewedMoviesAggregate(where: MovieWhere, directed: Boolean = true) : PersonMovieReviewedMoviesAggregationSelection
reviewedMovies(where: MovieWhere, options: MovieOptions, directed: Boolean = true) : [Movie!]! @introspection @relationship(type: "REVIEWED", direction: OUT)
reviewedMovies(where: MovieWhere, options: MovieOptions, directed: Boolean = true) : [Movie!]! @introspection @relationship(type: "REVIEWED", direction: OUT, properties: "ReviewedProperties")
reviewedMoviesConnection(
where: PersonReviewedMoviesConnectionWhere
first: Int
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ scalar _DirectiveExtensions @join__type(graph: AUTHORS) @join__type(graph: BOOKS
scalar _HoistConfig @join__type(graph: BOOKS)
type Query @extraSchemaDefinitionDirective(directives: {transport: [{kind: "http", subgraph: "authors", location: "http://localhost:<authors_port>/graphql", options: {}}]}) @extraSchemaDefinitionDirective(directives: {transport: [{kind: "http", subgraph: "books", location: "http://localhost:<books_port>/graphql", options: {}}]}) @join__type(graph: AUTHORS) @join__type(graph: BOOKS) {
author(id: ID!): Author @merge(subgraph: "authors", keyField: "id", keyArg: "id") @source(name: "authorWithBooks", type: "AuthorWithBooks", subgraph: "books") @merge(subgraph: "books", keyField: "id", keyArg: "id")
author(id: ID!): Author @merge(subgraph: "authors", keyField: "id", keyArg: "id") @merge(subgraph: "books", keyField: "id", keyArg: "id") @source(name: "authorWithBooks", type: "AuthorWithBooks", subgraph: "books")
authors(ids: [ID]): [Author] @merge(subgraph: "authors", keyField: "id", keyArg: "ids") @join__field(graph: AUTHORS)
book(id: ID!): Book @merge(subgraph: "books", keyField: "id", keyArg: "id") @merge(subgraph: "books", keyField: "authorId", keyArg: "id") @join__field(graph: BOOKS)
books(ids: [ID]): [Book!]! @merge(subgraph: "books", keyField: "id", keyArg: "ids") @merge(subgraph: "books", keyField: "authorId", keyArg: "ids") @join__field(graph: BOOKS)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP

exports[`Neo4j should generate correct schema 1`] = `
"schema @transport(kind: "neo4j", location: "neo4j+s://demo.neo4jlabs.com", options: {database: "movies", auth: {type: "basic", username: "movies", password: "movies"}}, subgraph: "Neo4j") {
"schema @transport(kind: "neo4j", subgraph: "Neo4j", location: "neo4j+s://demo.neo4jlabs.com", options: {database: "movies", auth: {type: "basic", username: "movies", password: "movies"}}) {
query: Query
mutation: Mutation
subscription: Subscription
}
directive @introspection(subgraph: String) on ENUM | ENUM_VALUE | FIELD_DEFINITION | INPUT_FIELD_DEFINITION | INPUT_OBJECT | INTERFACE | OBJECT | SCALAR | UNION
directive @relationship(direction: _RelationDirections, type: String) on FIELD_DEFINITION
directive @relationship(direction: _RelationDirections, properties: String, type: String) on FIELD_DEFINITION
directive @relationshipProperties on OBJECT
Expand Down
6 changes: 3 additions & 3 deletions packages/fusion/composition/src/federation-utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -130,10 +130,10 @@ export function convertSubgraphToFederationv2(subgraph: GraphQLSchema) {
const typeDirectives = getDirectiveExtensions(type);
typeDirectives.shareable ||= [];
if (!typeDirectives.shareable?.length) {
typeDirectives.shareable.push({});
const typeExtensions: Record<string, any> = (type.extensions ||= {});
typeExtensions.directives ||= {};
typeExtensions.directives.shareable = [{}];
}
const typeExtensions: Record<string, unknown> = (type.extensions ||= {});
typeExtensions.directives = typeDirectives;
return type;
},
});
Expand Down
2 changes: 1 addition & 1 deletion packages/legacy/mergers/bare/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
},
"dependencies": {
"@graphql-mesh/merger-stitching": "0.100.0",
"@graphql-tools/schema": "10.0.4"
"@graphql-tools/schema": "10.0.5"
},
"publishConfig": {
"access": "public",
Expand Down
2 changes: 1 addition & 1 deletion packages/legacy/runtime/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
"graphql-jit": "0.8.6"
},
"devDependencies": {
"@graphql-tools/schema": "10.0.4"
"@graphql-tools/schema": "10.0.5"
},
"publishConfig": {
"access": "public",
Expand Down
2 changes: 1 addition & 1 deletion packages/legacy/transforms/encapsulate/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
"@graphql-tools/wrap": "^10.0.5"
},
"devDependencies": {
"@graphql-tools/schema": "10.0.4"
"@graphql-tools/schema": "10.0.5"
},
"publishConfig": {
"access": "public",
Expand Down
2 changes: 1 addition & 1 deletion packages/legacy/transforms/naming-convention/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
},
"devDependencies": {
"@graphql-mesh/cache-localforage": "^0.100.0",
"@graphql-tools/schema": "10.0.4"
"@graphql-tools/schema": "10.0.5"
},
"publishConfig": {
"access": "public",
Expand Down
2 changes: 1 addition & 1 deletion packages/legacy/transforms/prefix/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
},
"devDependencies": {
"@graphql-mesh/cache-localforage": "0.100.0",
"@graphql-tools/schema": "10.0.4"
"@graphql-tools/schema": "10.0.5"
},
"publishConfig": {
"access": "public",
Expand Down
2 changes: 1 addition & 1 deletion packages/legacy/transforms/rate-limit/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
},
"devDependencies": {
"@graphql-mesh/cache-localforage": "0.100.0",
"@graphql-tools/schema": "10.0.4",
"@graphql-tools/schema": "10.0.5",
"@graphql-tools/wrap": "10.0.5"
},
"publishConfig": {
Expand Down
2 changes: 1 addition & 1 deletion packages/legacy/transforms/rename/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
},
"devDependencies": {
"@graphql-mesh/cache-localforage": "0.100.0",
"@graphql-tools/schema": "10.0.4"
"@graphql-tools/schema": "10.0.5"
},
"publishConfig": {
"access": "public",
Expand Down
2 changes: 1 addition & 1 deletion packages/legacy/transforms/replace-field/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
},
"devDependencies": {
"@graphql-mesh/cache-localforage": "0.100.0",
"@graphql-tools/schema": "10.0.4"
"@graphql-tools/schema": "10.0.5"
},
"publishConfig": {
"access": "public",
Expand Down
2 changes: 1 addition & 1 deletion packages/legacy/urql/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
"wonka": "^6.3.1"
},
"devDependencies": {
"@urql/core": "5.0.5",
"@urql/core": "5.0.6",
"wonka": "6.3.4"
},
"publishConfig": {
Expand Down
6 changes: 5 additions & 1 deletion packages/loaders/neo4j/src/schema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,11 @@ export async function loadGraphQLSchemaFromNeo4J(
...parse(
/* GraphQL */ `
directive @relationshipProperties on OBJECT
directive @relationship(type: String, direction: _RelationDirections) on FIELD_DEFINITION
directive @relationship(
type: String
direction: _RelationDirections
properties: String
) on FIELD_DEFINITION
enum _RelationDirections {
IN
OUT
Expand Down
2 changes: 1 addition & 1 deletion packages/loaders/openapi/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
"openapi-types": "^12.1.0"
},
"devDependencies": {
"@graphql-tools/utils": "10.3.4",
"@graphql-tools/utils": "10.5.2",
"@whatwg-node/fetch": "0.9.19",
"fets": "0.8.2",
"graphql-yoga": "5.6.3",
Expand Down
2 changes: 1 addition & 1 deletion packages/loaders/thrift/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
"thrift": "^0.20.0"
},
"devDependencies": {
"@graphql-tools/utils": "10.3.4"
"@graphql-tools/utils": "10.5.2"
},
"publishConfig": {
"access": "public",
Expand Down
17 changes: 16 additions & 1 deletion packages/transports/neo4j/src/executor.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import type { DefinitionNode, DirectiveNode, DocumentNode, GraphQLSchema } from 'graphql';
import { parse, visit } from 'graphql';
import { extendSchema, parse, visit } from 'graphql';
import { GraphQLBigInt } from 'graphql-scalars';
import type { Driver } from 'neo4j-driver';
import type { DisposableExecutor } from '@graphql-mesh/transport-common';
Expand Down Expand Up @@ -33,6 +33,21 @@ function filterIntrospectionDefinitions<TASTNode extends { directives?: readonly

export async function getNeo4JExecutor(opts: Neo4JExecutorOpts): Promise<DisposableExecutor> {
const schemaDirectives = getDirectiveExtensions(opts.schema);
if (!opts.schema.getDirective('relationship')) {
opts.schema = extendSchema(
opts.schema,
parse(
/* GraphQL */ `
directive @relationship(
type: String
direction: _RelationDirections
properties: String
) on FIELD_DEFINITION
`,
{ noLocation: true },
),
);
}
const transportDirectives = schemaDirectives?.transport;
if (!transportDirectives?.length) {
throw new Error('No transport directive found on the schema!');
Expand Down
Loading

0 comments on commit 9eead57

Please sign in to comment.