Skip to content

Commit

Permalink
fix(deps): update dependency @neo4j/introspector to v4 (#7866)
Browse files Browse the repository at this point in the history
* fix(deps): update dependency @neo4j/introspector to v4

* chore(dependencies): updated changesets for modified dependencies

* ..

* Remove extra logs

---------

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 Oct 31, 2024
1 parent d8c0d29 commit 0788b5d
Show file tree
Hide file tree
Showing 14 changed files with 68 additions and 388 deletions.
5 changes: 5 additions & 0 deletions .changeset/@omnigraph_neo4j-7866-dependencies.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@omnigraph/neo4j": patch
---
dependencies updates:
- Updated dependency [`@neo4j/introspector@^4.0.0` ↗︎](https://www.npmjs.com/package/@neo4j/introspector/v/4.0.0) (from `^3.0.0`, in `dependencies`)
6 changes: 6 additions & 0 deletions .changeset/nice-coins-hunt.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
'@omnigraph/neo4j': minor
'@omnigraph/grpc': minor
---

Use shared TransportOptions scalar in all transport directive definitions
131 changes: 2 additions & 129 deletions e2e/grpc-example/__snapshots__/grpc-example.test.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,8 @@ scalar BigInt @join__type(graph: MOVIES)
scalar ObjMap @join__type(graph: MOVIES)
scalar TransportOptions @join__type(graph: MOVIES)
scalar _DirectiveExtensions @join__type(graph: MOVIES)
type Query @grpcRootJson(
Expand Down Expand Up @@ -304,19 +306,6 @@ input google__protobuf__Timestamp_Input @join__type(graph: MOVIES) {
input SearchByCastRequest_Input @join__type(graph: MOVIES) {
castName: String
}
input TransportOptions @join__type(graph: MOVIES) {
requestTimeout: Int
credentialsSsl: GrpcCredentialsSsl
useHttps: Boolean @source(name: "useHTTPS", type: "Boolean", subgraph: "movies")
metaData: ObjMap
}
input GrpcCredentialsSsl @join__type(graph: MOVIES) {
rootCa: String @source(name: "rootCA", type: "String", subgraph: "movies")
certChain: String
privateKey: String
}
"
`;
Expand Down Expand Up @@ -344,119 +333,3 @@ exports[`gRPC Example gets movies correctly: get-movies-grpc-example-result 1`]
},
}
`;

exports[`gRPC Example streams movies by cast correctly: 0 1`] = `
{
"data": {
"exampleSearchMoviesByCast": [],
},
}
`;

exports[`gRPC Example streams movies by cast correctly: 1 1`] = `
{
"data": {
"exampleSearchMoviesByCast": [
{
"cast": [
"Tom Cruise",
"Simon Pegg",
"Jeremy Renner",
],
"name": "Mission: Impossible Rogue Nation",
"rating": 0.9700000286102295,
"year": 0,
},
],
},
}
`;

exports[`gRPC Example streams movies by cast correctly: 2 1`] = `
{
"data": {
"exampleSearchMoviesByCast": [
{
"cast": [
"Tom Cruise",
"Simon Pegg",
"Jeremy Renner",
],
"name": "Mission: Impossible Rogue Nation",
"rating": 0.9700000286102295,
"year": 0,
},
{
"cast": [
"Tom Cruise",
"Simon Pegg",
"Henry Cavill",
],
"name": "Mission: Impossible - Fallout",
"rating": 0.9300000071525574,
"year": 0,
},
],
},
}
`;

exports[`gRPC Example streams movies by cast correctly: 3 1`] = `
{
"data": {
"exampleSearchMoviesByCast": [
{
"cast": [
"Tom Cruise",
"Simon Pegg",
"Jeremy Renner",
],
"name": "Mission: Impossible Rogue Nation",
"rating": 0.9700000286102295,
"year": 0,
},
{
"cast": [
"Tom Cruise",
"Simon Pegg",
"Henry Cavill",
],
"name": "Mission: Impossible - Fallout",
"rating": 0.9300000071525574,
"year": 0,
},
null,
],
},
}
`;

exports[`gRPC Example streams movies by cast correctly: 4 1`] = `
{
"data": {
"exampleSearchMoviesByCast": [
{
"cast": [
"Tom Cruise",
"Simon Pegg",
"Jeremy Renner",
],
"name": "Mission: Impossible Rogue Nation",
"rating": 0.9700000286102295,
"year": 0,
},
{
"cast": [
"Tom Cruise",
"Simon Pegg",
"Henry Cavill",
],
"name": "Mission: Impossible - Fallout",
"rating": 0.9300000071525574,
"year": 0,
},
null,
],
},
}
`;
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ it('should compose and execute', async () => {
expect(supergraph).toContain('Test_Weather');
expect(supergraph).toContain('chanceOfRain');

const { execute } = await serve({ supergraph: output, pipeLogs: true });
const { execute } = await serve({ supergraph: output });
await expect(
execute({
query: /* GraphQL */ `
Expand Down
14 changes: 8 additions & 6 deletions e2e/neo4j-example/__snapshots__/neo4j-example.test.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ schema
@link(
url: "https://the-guild.dev/graphql/mesh/spec/v1.0"
import: ["@relationshipProperties", "@relationship", "@introspection", "@transport", "@extraSchemaDefinitionDirective"]
import: ["@relationshipProperties", "@relationship", "@introspection", "@transport", "@node", "@extraSchemaDefinitionDirective"]
)
{
query: Query
Expand Down Expand Up @@ -90,17 +90,19 @@ directive @relationship(type: String, direction: _RelationDirections, properties
directive @introspection(subgraph: String) repeatable on ENUM | OBJECT | INTERFACE | UNION | INPUT_OBJECT | FIELD_DEFINITION | SCALAR | ENUM_VALUE | INPUT_FIELD_DEFINITION
directive @transport(kind: String, subgraph: String, location: String, options: Any) repeatable on SCHEMA
directive @transport(kind: String, subgraph: String, location: String, options: TransportOptions) repeatable on SCHEMA
directive @extraSchemaDefinitionDirective(directives: _DirectiveExtensions) repeatable on OBJECT
directive @node on OBJECT
scalar Any @join__type(graph: MOVIES)
directive @extraSchemaDefinitionDirective(directives: _DirectiveExtensions) repeatable on OBJECT
"""
The \`BigInt\` scalar type represents non-fractional signed whole numeric values.
"""
scalar BigInt @join__type(graph: MOVIES)
scalar TransportOptions @join__type(graph: MOVIES)
scalar _DirectiveExtensions @join__type(graph: MOVIES)
type Query @extraSchemaDefinitionDirective(
Expand Down Expand Up @@ -181,7 +183,7 @@ type DeleteInfo @join__type(graph: MOVIES) {
relationshipsDeleted: Int!
}
type Movie @introspection @join__type(graph: MOVIES) {
type Movie @introspection @node @join__type(graph: MOVIES) {
released: BigInt! @introspection
tagline: String @introspection
title: String! @introspection
Expand Down Expand Up @@ -469,7 +471,7 @@ type PeopleConnection @join__type(graph: MOVIES) {
edges: [PersonEdge!]!
}
type Person @introspection @join__type(graph: MOVIES) {
type Person @introspection @node @join__type(graph: MOVIES) {
born: BigInt @introspection
name: String! @introspection
actedInMoviesAggregate(
Expand Down
15 changes: 2 additions & 13 deletions examples/grpc-example/tests/__snapshots__/grpc.test.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ exports[`gRPC Example should fetch movies by cast as a subscription correctly: m
`;

exports[`gRPC Example should generate correct schema: grpc-schema 1`] = `
"schema @transport(subgraph: "grpc", kind: "grpc", location: "localhost:50051", options: {requestTimeout: 200000, metaData: "{\\"someKey\\":\\"someValue\\",\\"connection_type\\":\\"{context.headers.connection}\\"}"}) {
"schema @transport(subgraph: "grpc", kind: "grpc", location: "localhost:50051", options: {requestTimeout: 200000, metaData: {someKey: "someValue", connection_type: "{context.headers.connection}"}}) {
query: Query
subscription: Subscription
}
Expand Down Expand Up @@ -216,18 +216,7 @@ type Subscription {
scalar ObjMap
input TransportOptions {
requestTimeout: Int
credentialsSsl: GrpcCredentialsSsl
useHttps: Boolean
metaData: ObjMap
}
input GrpcCredentialsSsl {
rootCa: String
certChain: String
privateKey: String
}"
scalar TransportOptions"
`;

exports[`gRPC Example should get movies correctly: get-movies-grpc-example-result 1`] = `
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -129,18 +129,7 @@ scalar artnet__coredata__playground__EchoUserInfoRequest_Input @specifiedBy(url:
scalar ObjMap
input TransportOptions {
requestTimeout: Int
credentialsSsl: GrpcCredentialsSsl
useHTTPS: Boolean
metaData: ObjMap
}
input GrpcCredentialsSsl {
rootCA: String
certChain: String
privateKey: String
}"
scalar TransportOptions"
`;

exports[`gRPC Reflection Example should get greeting correctly: greeting-result 1`] = `
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,13 @@ exports[`Neo4j should generate correct schema 1`] = `
directive @introspection(subgraph: String) on ENUM | ENUM_VALUE | FIELD_DEFINITION | INPUT_FIELD_DEFINITION | INPUT_OBJECT | INTERFACE | OBJECT | SCALAR | UNION
directive @node on OBJECT
directive @relationship(direction: _RelationDirections, properties: String, type: String) on FIELD_DEFINITION
directive @relationshipProperties on OBJECT
directive @transport(kind: String, location: String, options: Any, subgraph: String) on SCHEMA
directive @transport(kind: String, location: String, options: TransportOptions, subgraph: String) on SCHEMA
"""
The edge properties for the following fields:
Expand Down Expand Up @@ -47,8 +49,6 @@ input ActedInPropertiesWhere {
roles_INCLUDES: String
}
scalar Any
"""
The \`BigInt\` scalar type represents non-fractional signed whole numeric values.
"""
Expand Down Expand Up @@ -95,7 +95,7 @@ enum EventType {
UPDATE
}
type Movie @introspection {
type Movie @introspection @node {
peopleActedIn(directed: Boolean = true @deprecated(reason: "The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server"), limit: Int, offset: Int, options: PersonOptions @deprecated(reason: "Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead."), sort: [PersonSort!], where: PersonWhere): [Person!]! @introspection @relationship(type: "ACTED_IN", direction: IN, properties: "ActedInProperties")
peopleActedInAggregate(directed: Boolean = true @deprecated(reason: "The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server"), where: PersonWhere): MoviePersonPeopleActedInAggregationSelection
peopleActedInConnection(after: String, directed: Boolean = true @deprecated(reason: "The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server"), first: Int, sort: [MoviePeopleActedInConnectionSort!], where: MoviePeopleActedInConnectionWhere): MoviePeopleActedInConnection!
Expand Down Expand Up @@ -1103,7 +1103,7 @@ type PeopleConnection {
totalCount: Int!
}
type Person @introspection {
type Person @introspection @node {
actedInMovies(directed: Boolean = true @deprecated(reason: "The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server"), limit: Int, offset: Int, options: MovieOptions @deprecated(reason: "Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead."), sort: [MovieSort!], where: MovieWhere): [Movie!]! @introspection @relationship(type: "ACTED_IN", direction: OUT, properties: "ActedInProperties")
actedInMoviesAggregate(directed: Boolean = true @deprecated(reason: "The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server"), where: MovieWhere): PersonMovieActedInMoviesAggregationSelection
actedInMoviesConnection(after: String, directed: Boolean = true @deprecated(reason: "The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server"), first: Int, sort: [PersonActedInMoviesConnectionSort!], where: PersonActedInMoviesConnectionWhere): PersonActedInMoviesConnection!
Expand Down Expand Up @@ -2665,6 +2665,8 @@ type Subscription {
personUpdated(where: PersonSubscriptionWhere): PersonUpdatedEvent!
}
scalar TransportOptions
"""
Information about the number of nodes and relationships created and deleted during an update mutation
"""
Expand Down
10 changes: 10 additions & 0 deletions examples/neo4j-example/tests/neo4j-example.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,16 @@ describe('Neo4j', () => {
config = await findAndParseConfig({
dir: join(__dirname, '..'),
});
config.logger = {
debug: jest.fn(),
error: jest.fn(),
info: jest.fn(),
warn: jest.fn(),
log: jest.fn(),
child() {
return this;
},
};
mesh = await getMesh(config);
});
jest.setTimeout(120_000);
Expand Down
Loading

0 comments on commit 0788b5d

Please sign in to comment.