diff --git a/.changeset/quick-insects-turn.md b/.changeset/quick-insects-turn.md new file mode 100644 index 0000000000..1a7c27d446 --- /dev/null +++ b/.changeset/quick-insects-turn.md @@ -0,0 +1,5 @@ +--- +"@neo4j/graphql": major +--- + +Made `@relationshipProperties` mandatory for relationship property interfaces diff --git a/docs/modules/ROOT/pages/directives.adoc b/docs/modules/ROOT/pages/directives.adoc index 656803d75d..fd2d56e005 100644 --- a/docs/modules/ROOT/pages/directives.adoc +++ b/docs/modules/ROOT/pages/directives.adoc @@ -113,13 +113,13 @@ Reference: xref::type-definitions/relationships.adoc[Relationships] == `@relationshipProperties` -Optional syntactic sugar to help you distinguish between interfaces which are used for relationship properties, and otherwise. +Required to help you distinguish between interfaces which are used for relationship properties, and otherwise. Can only be used on interfaces, as per its definition: [source, graphql, indent=0] ---- -"""Syntactic sugar to help differentiate between interfaces for relationship properties, and otherwise.""" +"""Required to differentiate between interfaces for relationship properties, and otherwise.""" directive @relationshipProperties on INTERFACE ---- diff --git a/docs/modules/ROOT/pages/filtering.adoc b/docs/modules/ROOT/pages/filtering.adoc index 3c708436cc..0c7fd6644e 100644 --- a/docs/modules/ROOT/pages/filtering.adoc +++ b/docs/modules/ROOT/pages/filtering.adoc @@ -341,7 +341,7 @@ type Person { name: String } -interface ActedIn { +interface ActedIn @relationshipProperties { screenTime: Int } ---- diff --git a/docs/modules/ROOT/pages/guides/v2-migration/mutations.adoc b/docs/modules/ROOT/pages/guides/v2-migration/mutations.adoc index fecbde2b93..ca289a52a2 100644 --- a/docs/modules/ROOT/pages/guides/v2-migration/mutations.adoc +++ b/docs/modules/ROOT/pages/guides/v2-migration/mutations.adoc @@ -1,7 +1,7 @@ [[v2-migration-mutations]] = Mutations -The most broadly affected area of functionality by the 2.0.0 upgrade are the nested operations of Mutations, to faciliate the mutation of and filtering on relationship properties. +The most broadly affected area of functionality by the 2.0.0 upgrade are the nested operations of Mutations, to facilitate the mutation of and filtering on relationship properties. The examples in this section will be based off the following type definitions: diff --git a/docs/modules/ROOT/pages/guides/v4-migration/index.adoc b/docs/modules/ROOT/pages/guides/v4-migration/index.adoc index e4467d96a3..b882d6bdb9 100644 --- a/docs/modules/ROOT/pages/guides/v4-migration/index.adoc +++ b/docs/modules/ROOT/pages/guides/v4-migration/index.adoc @@ -130,6 +130,75 @@ const neoSchema = new Neo4jGraphQL({ }) ---- +==== `requires` changes + +In version 4.0.0, it is now possible to require non-scalar fields. This means it is also possible to require fields on related type. +To make this possible, the `requires` argument now accept a graphql selection set instead of a list of strings. + +Therefore, the following type definitions: + +[source, graphql, indent=0] +---- +type User { + firstName: String! + lastName: String! + fullName: String! @customResolver(requires: ["firstName", "lastName"]) +} +---- + +Would need to be modified to use a selection set as below: + +[source, graphql, indent=0] +---- +type User { + firstName: String! + lastName: String! + fullName: String! @customResolver(requires: "firstName lastName") +} +---- + +Below is a more advanced example showing what the selection set is capable of: + +[source, graphql, indent=0] +---- +interface Publication { + publicationYear: Int! +} + +type Author { + name: String! + publications: [Publication!]! @relationship(type: "WROTE", direction: OUT) + publicationsWithAuthor: [String!]! + @customResolver( + requires: "name publications { publicationYear ...on Book { title } ... on Journal { subject } }" + ) +} + +type Book implements Publication { + title: String! + publicationYear: Int! + author: [Author!]! @relationship(type: "WROTE", direction: IN) +} + +type Journal implements Publication { + subject: String! + publicationYear: Int! + author: [Author!]! @relationship(type: "WROTE", direction: IN) +} +---- + +Additionally, the requires argument also validates the required selection set against your type definitions. +Therefore, as there is no field called `someFieldThatDoesNotExist`, an error would be thrown on startup if you tried to use the following type definitions: + +[source, graphql, indent=0] +---- +type User { + firstName: String! + lastName: String! + fullName: String! @customResolver(requires: "firstName someFieldThatDoesNotExist") +} +---- + [plural-migration] === `plural` argument removed from `@node` and replaced with `@plural` @@ -406,76 +475,49 @@ type query { Additionally, escaping strings is no longer needed. -=== `@customResolver` changes +=== Mandatory `@relationshipProperties` -In version 4.0.0, it is now possible to require non-scalar fields. This means it is also possible to require fields on related type. -To make this possible, the `requires` argument now accept a graphql selection set instead of a list of strings. +Upcoming changes to interfaces require us to distinguish between interfaces that are used to specify relationship properties, and others. Therefore, the `@relationshipProperties` directive is now required on all relationship property interfaces. +If it is not included, an error will be thrown. -Therefore, the following type definitions: +As a result, in version 4.0.0, the following type definitions are invalid: [source, graphql, indent=0] ---- -type User { - firstName: String! - lastName: String! - fullName: String! @customResolver(requires: ["firstName", "lastName"]) +type Person { + name: String! + movies: [Movie!]! @relationship(type: "ACTED_IN", direction: OUT, properties: "ActedIn") } ----- -Would need to be modified to use a selection set as below: +type Movie { + title: String! + actors: [Person!]! @relationship(type: "ACTED_IN", direction: IN, properties: "ActedIn") +} -[source, graphql, indent=0] ----- -type User { - firstName: String! - lastName: String! - fullName: String! @customResolver(requires: "firstName lastName") +interface ActedIn { + screenTime: Int! } ---- -Below is a more advanced example showing what the selection set is capable of: +Instead, they would need to be updated as below: [source, graphql, indent=0] ---- -interface Publication { - publicationYear: Int! +type Person { + name: String! + movies: [Movie!]! @relationship(type: "ACTED_IN", direction: OUT, properties: "ActedIn") } -type Author { - name: String! - publications: [Publication!]! @relationship(type: "WROTE", direction: OUT) - publicationsWithAuthor: [String!]! - @customResolver( - requires: "name publications { publicationYear ...on Book { title } ... on Journal { subject } }" - ) -} - -type Book implements Publication { - title: String! - publicationYear: Int! - author: [Author!]! @relationship(type: "WROTE", direction: IN) -} - -type Journal implements Publication { - subject: String! - publicationYear: Int! - author: [Author!]! @relationship(type: "WROTE", direction: IN) +type Movie { + title: String! + actors: [Person!]! @relationship(type: "ACTED_IN", direction: IN, properties: "ActedIn") } ----- - -Additionally, the requires argument also validates the required selection set against your type definitions. -Therefore, as there is no field called `someFieldThatDoesNotExist`, an error would be thrown on startup if you tried to use the following type definitions: -[source, graphql, indent=0] ----- -type User { - firstName: String! - lastName: String! - fullName: String! @customResolver(requires: "firstName someFieldThatDoesNotExist") +interface ActedIn @relationshipProperties { + screenTime: Int! } ---- - == Miscellaneous changes [[startup-validation]] diff --git a/docs/modules/ROOT/pages/queries.adoc b/docs/modules/ROOT/pages/queries.adoc index 5f57406ac6..3cc0757a00 100644 --- a/docs/modules/ROOT/pages/queries.adoc +++ b/docs/modules/ROOT/pages/queries.adoc @@ -24,7 +24,7 @@ type User { friends: [User!]! @relationship(type: "FRIENDS_WITH", direction: OUT) } -interface PostedAt { +interface PostedAt @relationshipProperties { date: DateTime } ---- diff --git a/docs/modules/ROOT/pages/subscriptions/events/create_relationship.adoc b/docs/modules/ROOT/pages/subscriptions/events/create_relationship.adoc index 4a31c0d5cb..9682bd27ae 100644 --- a/docs/modules/ROOT/pages/subscriptions/events/create_relationship.adoc +++ b/docs/modules/ROOT/pages/subscriptions/events/create_relationship.adoc @@ -226,7 +226,7 @@ type Influencer implements Reviewer { reputation: Int! } -interface Review { +interface Review @relationshipProperties { score: Int! } ``` diff --git a/docs/modules/ROOT/pages/subscriptions/events/delete_relationship.adoc b/docs/modules/ROOT/pages/subscriptions/events/delete_relationship.adoc index b28d67e53a..797e053bfa 100644 --- a/docs/modules/ROOT/pages/subscriptions/events/delete_relationship.adoc +++ b/docs/modules/ROOT/pages/subscriptions/events/delete_relationship.adoc @@ -226,7 +226,7 @@ type Influencer implements Reviewer { reputation: Int! } -interface Review { +interface Review @relationshipProperties { score: Int! } ``` diff --git a/docs/modules/ROOT/pages/subscriptions/filtering.adoc b/docs/modules/ROOT/pages/subscriptions/filtering.adoc index 1c85395101..a93bad6021 100644 --- a/docs/modules/ROOT/pages/subscriptions/filtering.adoc +++ b/docs/modules/ROOT/pages/subscriptions/filtering.adoc @@ -335,7 +335,7 @@ type Magazine implements Reviewer { reputation: Int! } -interface Review { +interface Review @relationshipProperties { score: Int! } ---- diff --git a/docs/modules/ROOT/pages/type-definitions/basics.adoc b/docs/modules/ROOT/pages/type-definitions/basics.adoc index 0f8e005eb4..3a93f50f21 100644 --- a/docs/modules/ROOT/pages/type-definitions/basics.adoc +++ b/docs/modules/ROOT/pages/type-definitions/basics.adoc @@ -39,7 +39,8 @@ Note there is a directive on each "end" of the relationship in this case, but it === Relationship properties -In order to add relationship properties to a relationship, you need to add a new type to your type definitions, but this time it will be of type `interface`. For example, for your "ACTED_IN" relationship, add a property "roles": +In order to add relationship properties to a relationship, you need to add a new type to your type definitions, but this time it will be of type `interface`. This interface must be decorated with the `@relationshipProperties` directive. +For example, for your "ACTED_IN" relationship, add a property "roles": [source, graphql, indent=0] ---- diff --git a/docs/modules/ROOT/pages/type-definitions/interfaces.adoc b/docs/modules/ROOT/pages/type-definitions/interfaces.adoc index 1671c1d4a0..9cf83c3639 100644 --- a/docs/modules/ROOT/pages/type-definitions/interfaces.adoc +++ b/docs/modules/ROOT/pages/type-definitions/interfaces.adoc @@ -5,7 +5,7 @@ The Neo4j GraphQL Library supports the use of interfaces on relationship fields. == Type definitions -The following schema defines a `Actor` type, that has a relationship `ACTED_IN`, of type `[Production!]!`. `Production` is an interface type with `Movie` and `Series` implementations. Note in this example that relationship properties have also been used with the `@relationshipProperties` directive as syntactic sugar, so that interfaces representing relationship properties can be easily distinguished. +The following schema defines a `Actor` type, that has a relationship `ACTED_IN`, of type `[Production!]!`. `Production` is an interface type with `Movie` and `Series` implementations. Note in this example that relationship properties have also been used with the `@relationshipProperties` directive, so that interfaces representing relationship properties can be easily distinguished. [source, graphql, indent=0] ---- diff --git a/docs/modules/ROOT/pages/type-definitions/relationships.adoc b/docs/modules/ROOT/pages/type-definitions/relationships.adoc index 6f9b6783de..bd34f9ecbb 100644 --- a/docs/modules/ROOT/pages/type-definitions/relationships.adoc +++ b/docs/modules/ROOT/pages/type-definitions/relationships.adoc @@ -56,7 +56,7 @@ The following should be noted about the fields you just added: Relationship properties can be added to the above type definitions in two steps: -1. Add an interface definition containing the desired relationship properties +1. Add an interface definition, decorated with the `@relationshipProperties` directive, containing the desired relationship properties 2. Add a `properties` argument to both "sides" of the `@relationship` directive which points to the newly defined interface For example, to distinguish which roles an actor played in a movie: diff --git a/packages/graphql/src/graphql/directives/relationship-properties.ts b/packages/graphql/src/graphql/directives/relationship-properties.ts index 8dc00764ce..b23d470805 100644 --- a/packages/graphql/src/graphql/directives/relationship-properties.ts +++ b/packages/graphql/src/graphql/directives/relationship-properties.ts @@ -21,6 +21,6 @@ import { DirectiveLocation, GraphQLDirective } from "graphql"; export const relationshipPropertiesDirective = new GraphQLDirective({ name: "relationshipProperties", - description: "Syntactic sugar to help differentiate between interfaces for relationship properties, and otherwise.", + description: "Required to differentiate between interfaces for relationship properties, and otherwise.", locations: [DirectiveLocation.INTERFACE], }); diff --git a/packages/graphql/src/schema/get-nodes.ts b/packages/graphql/src/schema/get-nodes.ts index e263886bee..70edb693fc 100644 --- a/packages/graphql/src/schema/get-nodes.ts +++ b/packages/graphql/src/schema/get-nodes.ts @@ -169,6 +169,14 @@ function getNodes( `Cannot find interface specified in ${definition.name.value}.${relationship.fieldName}` ); } + const relationshipPropertiesDirective = propertiesInterface.directives?.find( + (directive) => directive.name.value === "relationshipProperties" + ); + if (!relationshipPropertiesDirective) { + throw new Error( + `The \`@relationshipProperties\` directive could not be found on the \`${relationship.properties}\` interface` + ); + } relationshipPropertyInterfaceNames.add(relationship.properties); } if (relationship.interface) { diff --git a/packages/graphql/src/schema/make-augmented-schema.test.ts b/packages/graphql/src/schema/make-augmented-schema.test.ts index d672e1a49d..af49ea778f 100644 --- a/packages/graphql/src/schema/make-augmented-schema.test.ts +++ b/packages/graphql/src/schema/make-augmented-schema.test.ts @@ -208,7 +208,7 @@ describe("makeAugmentedSchema", () => { name: String } - interface ActedIn @auth(rules: [{ operations: [CREATE], roles: ["admin"] }]) { + interface ActedIn @auth(rules: [{ operations: [CREATE], roles: ["admin"] }]) @relationshipProperties { screenTime: Int } `; @@ -228,7 +228,7 @@ describe("makeAugmentedSchema", () => { name: String } - interface ActedIn { + interface ActedIn @relationshipProperties { screenTime: Int @auth(rules: [{ operations: [CREATE], roles: ["admin"] }]) } `; @@ -246,7 +246,7 @@ describe("makeAugmentedSchema", () => { name: String } - interface ActedIn { + interface ActedIn @relationshipProperties { actors: Actor! @relationship(type: "ACTED_IN", direction: OUT, properties: "ActedIn") } `; @@ -266,7 +266,7 @@ describe("makeAugmentedSchema", () => { name: String } - interface ActedIn { + interface ActedIn @relationshipProperties { id: ID @cypher(statement: "RETURN id(this) as id", columnName: "id") roles: [String] } @@ -285,7 +285,7 @@ describe("makeAugmentedSchema", () => { actors: [Actor!]! @relationship(type: "ACTED_IN", direction: OUT, properties: "ActedIn") } - interface ActedIn { + interface ActedIn @relationshipProperties { node: ID } @@ -306,7 +306,7 @@ describe("makeAugmentedSchema", () => { actors: [Actor!]! @relationship(type: "ACTED_IN", direction: OUT, properties: "ActedIn") } - interface ActedIn { + interface ActedIn @relationshipProperties { cursor: ID } @@ -334,7 +334,7 @@ describe("makeAugmentedSchema", () => { name: String } - interface ActedIn { + interface ActedIn @relationshipProperties { id: ID @unique roles: [String] } diff --git a/packages/graphql/tests/e2e/subscriptions/auth/authentication.int.test.ts b/packages/graphql/tests/e2e/subscriptions/auth/authentication.int.test.ts index 44387144ce..ea0b16d7a2 100644 --- a/packages/graphql/tests/e2e/subscriptions/auth/authentication.int.test.ts +++ b/packages/graphql/tests/e2e/subscriptions/auth/authentication.int.test.ts @@ -294,7 +294,7 @@ describe("Subscription authentication", () => { year: Int! } - interface Review { + interface Review @relationshipProperties { score: Int! } diff --git a/packages/graphql/tests/e2e/subscriptions/create-relationship.e2e.test.ts b/packages/graphql/tests/e2e/subscriptions/create-relationship.e2e.test.ts index 683c80f12d..9906e6b3c0 100644 --- a/packages/graphql/tests/e2e/subscriptions/create-relationship.e2e.test.ts +++ b/packages/graphql/tests/e2e/subscriptions/create-relationship.e2e.test.ts @@ -70,7 +70,7 @@ describe("Create Relationship Subscription", () => { year: Int! } - interface Review { + interface Review @relationshipProperties { score: Int! } diff --git a/packages/graphql/tests/e2e/subscriptions/delete-complex.e2e.test.ts b/packages/graphql/tests/e2e/subscriptions/delete-complex.e2e.test.ts index 53c2fd5f08..b996aef011 100644 --- a/packages/graphql/tests/e2e/subscriptions/delete-complex.e2e.test.ts +++ b/packages/graphql/tests/e2e/subscriptions/delete-complex.e2e.test.ts @@ -68,7 +68,7 @@ describe("Delete Subscriptions - with interfaces, unions and nested operations", year: Int! } - interface Review { + interface Review @relationshipProperties { score: Int! } diff --git a/packages/graphql/tests/e2e/subscriptions/delete-relationship-via-delete-with-relationships.e2e.test.ts b/packages/graphql/tests/e2e/subscriptions/delete-relationship-via-delete-with-relationships.e2e.test.ts index 79a631363c..cbc2d9e0c2 100644 --- a/packages/graphql/tests/e2e/subscriptions/delete-relationship-via-delete-with-relationships.e2e.test.ts +++ b/packages/graphql/tests/e2e/subscriptions/delete-relationship-via-delete-with-relationships.e2e.test.ts @@ -68,7 +68,7 @@ describe("Delete Subscriptions when relationships are targeted- with interfaces, year: Int! } - interface Review { + interface Review @relationshipProperties { score: Int! } diff --git a/packages/graphql/tests/e2e/subscriptions/delete-relationship-via-delete.e2e.test.ts b/packages/graphql/tests/e2e/subscriptions/delete-relationship-via-delete.e2e.test.ts index b02eecd33f..6dbc159018 100644 --- a/packages/graphql/tests/e2e/subscriptions/delete-relationship-via-delete.e2e.test.ts +++ b/packages/graphql/tests/e2e/subscriptions/delete-relationship-via-delete.e2e.test.ts @@ -68,7 +68,7 @@ describe("Delete Subscriptions when only nodes are targeted - with interfaces, u year: Int! } - interface Review { + interface Review @relationshipProperties { score: Int! } diff --git a/packages/graphql/tests/e2e/subscriptions/delete-relationship.e2e.test.ts b/packages/graphql/tests/e2e/subscriptions/delete-relationship.e2e.test.ts index 8d2b4fb719..be417ad8e9 100644 --- a/packages/graphql/tests/e2e/subscriptions/delete-relationship.e2e.test.ts +++ b/packages/graphql/tests/e2e/subscriptions/delete-relationship.e2e.test.ts @@ -71,7 +71,7 @@ describe("Delete Relationship Subscription", () => { year: Int! } - interface Review { + interface Review @relationshipProperties { score: Int! } diff --git a/packages/graphql/tests/e2e/subscriptions/filtering/create-relationship.e2e.test.ts b/packages/graphql/tests/e2e/subscriptions/filtering/create-relationship.e2e.test.ts index ab67421a9c..e03d40b3b4 100644 --- a/packages/graphql/tests/e2e/subscriptions/filtering/create-relationship.e2e.test.ts +++ b/packages/graphql/tests/e2e/subscriptions/filtering/create-relationship.e2e.test.ts @@ -70,7 +70,7 @@ describe("Connect Subscription with optional filters valid for all types", () => year: Int! } - interface Review { + interface Review @relationshipProperties { score: Int! } diff --git a/packages/graphql/tests/integration/advanced-filtering.int.test.ts b/packages/graphql/tests/integration/advanced-filtering.int.test.ts index e2bc664924..ea1253a610 100644 --- a/packages/graphql/tests/integration/advanced-filtering.int.test.ts +++ b/packages/graphql/tests/integration/advanced-filtering.int.test.ts @@ -1617,7 +1617,7 @@ describe("Advanced Filtering", () => { id: ID } - interface ActedIn { + interface ActedIn @relationshipProperties { id: String } `; @@ -1684,7 +1684,7 @@ describe("Advanced Filtering", () => { id: ID } - interface ActedIn { + interface ActedIn @relationshipProperties { id: String } `; @@ -1904,7 +1904,7 @@ describe("Advanced Filtering", () => { id: ID } - interface ActedIn { + interface ActedIn @relationshipProperties { id: ID } `; diff --git a/packages/graphql/tests/integration/aggregations/field-level/field-level-aggregations-graphql-alias.int.test.ts b/packages/graphql/tests/integration/aggregations/field-level/field-level-aggregations-graphql-alias.int.test.ts index 4e8049a632..e5849c2f9d 100644 --- a/packages/graphql/tests/integration/aggregations/field-level/field-level-aggregations-graphql-alias.int.test.ts +++ b/packages/graphql/tests/integration/aggregations/field-level/field-level-aggregations-graphql-alias.int.test.ts @@ -51,7 +51,7 @@ describe("Field Level Aggregations Graphql alias", () => { ${typeMovie.plural}: [${typeMovie.name}!]! @relationship(type: "ACTED_IN", direction: OUT, properties:"ActedIn") } - interface ActedIn { + interface ActedIn @relationshipProperties { screentime: Int character: String } diff --git a/packages/graphql/tests/integration/aggregations/field-level/field-level-aggregations.int.test.ts b/packages/graphql/tests/integration/aggregations/field-level/field-level-aggregations.int.test.ts index 223ec6a51d..d45f5376bf 100644 --- a/packages/graphql/tests/integration/aggregations/field-level/field-level-aggregations.int.test.ts +++ b/packages/graphql/tests/integration/aggregations/field-level/field-level-aggregations.int.test.ts @@ -51,7 +51,7 @@ describe("Field Level Aggregations", () => { ${typeMovie.plural}: [${typeMovie.name}!]! @relationship(type: "ACTED_IN", direction: OUT, properties:"ActedIn") } - interface ActedIn { + interface ActedIn @relationshipProperties { screentime: Int character: String } diff --git a/packages/graphql/tests/integration/aggregations/field-level/nested-field-level-aggregations.int.test.ts b/packages/graphql/tests/integration/aggregations/field-level/nested-field-level-aggregations.int.test.ts index 76cc84ec42..98381d041a 100644 --- a/packages/graphql/tests/integration/aggregations/field-level/nested-field-level-aggregations.int.test.ts +++ b/packages/graphql/tests/integration/aggregations/field-level/nested-field-level-aggregations.int.test.ts @@ -51,7 +51,7 @@ describe("Nested Field Level Aggregations", () => { ${typeMovie.plural}: [${typeMovie.name}!]! @relationship(type: "ACTED_IN", direction: OUT, properties:"ActedIn") } - interface ActedIn { + interface ActedIn @relationshipProperties { screentime: Int character: String } diff --git a/packages/graphql/tests/integration/aggregations/field-level/where/field-aggregation-where.int.test.ts b/packages/graphql/tests/integration/aggregations/field-level/where/field-aggregation-where.int.test.ts index 3aea1d23fd..aa05112e22 100644 --- a/packages/graphql/tests/integration/aggregations/field-level/where/field-aggregation-where.int.test.ts +++ b/packages/graphql/tests/integration/aggregations/field-level/where/field-aggregation-where.int.test.ts @@ -51,7 +51,7 @@ describe("Field Level Aggregations Where", () => { movies: [${typeMovie.name}!]! @relationship(type: "ACTED_IN", direction: OUT, properties:"ActedIn") } - interface ActedIn { + interface ActedIn @relationshipProperties { screentime: Int character: String } diff --git a/packages/graphql/tests/integration/aggregations/where/edge/bigint.int.test.ts b/packages/graphql/tests/integration/aggregations/where/edge/bigint.int.test.ts index 3ae7ac5a7e..eb1ff197c8 100644 --- a/packages/graphql/tests/integration/aggregations/where/edge/bigint.int.test.ts +++ b/packages/graphql/tests/integration/aggregations/where/edge/bigint.int.test.ts @@ -51,7 +51,7 @@ describe("aggregations-where-edge-bigint", () => { likes: [User!]! @relationship(type: "LIKES", direction: IN, properties: "Likes") } - interface Likes { + interface Likes @relationshipProperties { someBigInt: BigInt } `; @@ -118,7 +118,7 @@ describe("aggregations-where-edge-bigint", () => { likes: [User!]! @relationship(type: "LIKES", direction: IN, properties: "Likes") } - interface Likes { + interface Likes @relationshipProperties { someBigInt: BigInt } `; @@ -188,7 +188,7 @@ describe("aggregations-where-edge-bigint", () => { likes: [User!]! @relationship(type: "LIKES", direction: IN, properties: "Likes") } - interface Likes { + interface Likes @relationshipProperties { someBigInt: BigInt } `; @@ -255,7 +255,7 @@ describe("aggregations-where-edge-bigint", () => { likes: [User!]! @relationship(type: "LIKES", direction: IN, properties: "Likes") } - interface Likes { + interface Likes @relationshipProperties { someBigInt: BigInt } `; @@ -324,7 +324,7 @@ describe("aggregations-where-edge-bigint", () => { likes: [User!]! @relationship(type: "LIKES", direction: IN, properties: "Likes") } - interface Likes { + interface Likes @relationshipProperties { someBigInt: BigInt } `; diff --git a/packages/graphql/tests/integration/aggregations/where/edge/datetime.int.test.ts b/packages/graphql/tests/integration/aggregations/where/edge/datetime.int.test.ts index 84b316d2e4..16ba8e3a71 100644 --- a/packages/graphql/tests/integration/aggregations/where/edge/datetime.int.test.ts +++ b/packages/graphql/tests/integration/aggregations/where/edge/datetime.int.test.ts @@ -49,7 +49,7 @@ describe("aggregations-where-edge-datetime", () => { likes: [User!]! @relationship(type: "LIKES", direction: IN, properties: "Likes") } - interface Likes { + interface Likes @relationshipProperties { someDateTime: DateTime } `; @@ -118,7 +118,7 @@ describe("aggregations-where-edge-datetime", () => { likes: [User!]! @relationship(type: "LIKES", direction: IN, properties: "Likes") } - interface Likes { + interface Likes @relationshipProperties { someDateTime: DateTime } `; @@ -189,7 +189,7 @@ describe("aggregations-where-edge-datetime", () => { likes: [User!]! @relationship(type: "LIKES", direction: IN, properties: "Likes") } - interface Likes { + interface Likes @relationshipProperties { someDateTime: DateTime } `; @@ -258,7 +258,7 @@ describe("aggregations-where-edge-datetime", () => { likes: [User!]! @relationship(type: "LIKES", direction: IN, properties: "Likes") } - interface Likes { + interface Likes @relationshipProperties { someDateTime: DateTime } `; @@ -329,7 +329,7 @@ describe("aggregations-where-edge-datetime", () => { likes: [User!]! @relationship(type: "LIKES", direction: IN, properties: "Likes") } - interface Likes { + interface Likes @relationshipProperties { someDateTime: DateTime } `; diff --git a/packages/graphql/tests/integration/aggregations/where/edge/duration.int.test.ts b/packages/graphql/tests/integration/aggregations/where/edge/duration.int.test.ts index 069dc30c06..c6424195cd 100644 --- a/packages/graphql/tests/integration/aggregations/where/edge/duration.int.test.ts +++ b/packages/graphql/tests/integration/aggregations/where/edge/duration.int.test.ts @@ -49,7 +49,7 @@ describe("aggregations-where-edge-duration", () => { likes: [${User}!]! @relationship(type: "LIKES", direction: IN, properties: "Likes") } - interface Likes { + interface Likes @relationshipProperties { someDuration: Duration! } `; diff --git a/packages/graphql/tests/integration/aggregations/where/edge/float.int.test.ts b/packages/graphql/tests/integration/aggregations/where/edge/float.int.test.ts index 362b078216..28afe4909f 100644 --- a/packages/graphql/tests/integration/aggregations/where/edge/float.int.test.ts +++ b/packages/graphql/tests/integration/aggregations/where/edge/float.int.test.ts @@ -49,7 +49,7 @@ describe("aggregations-where-edge-float", () => { likes: [User!]! @relationship(type: "LIKES", direction: IN, properties: "Likes") } - interface Likes { + interface Likes @relationshipProperties { someFloat: Float } `; @@ -118,7 +118,7 @@ describe("aggregations-where-edge-float", () => { likes: [User!]! @relationship(type: "LIKES", direction: IN, properties: "Likes") } - interface Likes { + interface Likes @relationshipProperties { someFloat: Float } `; @@ -188,7 +188,7 @@ describe("aggregations-where-edge-float", () => { likes: [User!]! @relationship(type: "LIKES", direction: IN, properties: "Likes") } - interface Likes { + interface Likes @relationshipProperties { someFloat: Float } `; @@ -257,7 +257,7 @@ describe("aggregations-where-edge-float", () => { likes: [User!]! @relationship(type: "LIKES", direction: IN, properties: "Likes") } - interface Likes { + interface Likes @relationshipProperties { someFloat: Float } `; @@ -327,7 +327,7 @@ describe("aggregations-where-edge-float", () => { likes: [User!]! @relationship(type: "LIKES", direction: IN, properties: "Likes") } - interface Likes { + interface Likes @relationshipProperties { someFloat: Float } `; diff --git a/packages/graphql/tests/integration/aggregations/where/edge/id.int.test.ts b/packages/graphql/tests/integration/aggregations/where/edge/id.int.test.ts index 3b533c453b..11e02bd7ee 100644 --- a/packages/graphql/tests/integration/aggregations/where/edge/id.int.test.ts +++ b/packages/graphql/tests/integration/aggregations/where/edge/id.int.test.ts @@ -49,7 +49,7 @@ describe("aggregations-where-edge-id", () => { likes: [User!]! @relationship(type: "LIKES", direction: IN, properties: "Likes") } - interface Likes { + interface Likes @relationshipProperties { testId: ID } `; diff --git a/packages/graphql/tests/integration/aggregations/where/edge/int.int.test.ts b/packages/graphql/tests/integration/aggregations/where/edge/int.int.test.ts index af0b12179f..7dfa526b8d 100644 --- a/packages/graphql/tests/integration/aggregations/where/edge/int.int.test.ts +++ b/packages/graphql/tests/integration/aggregations/where/edge/int.int.test.ts @@ -50,7 +50,7 @@ describe("aggregations-where-edge-int", () => { likes: [User!]! @relationship(type: "LIKES", direction: IN, properties: "Likes") } - interface Likes { + interface Likes @relationshipProperties { someInt: Int } `; @@ -115,7 +115,7 @@ describe("aggregations-where-edge-int", () => { likes: [User!]! @relationship(type: "LIKES", direction: IN, properties: "Likes") } - interface Likes { + interface Likes @relationshipProperties { someInt: Int } `; @@ -182,7 +182,7 @@ describe("aggregations-where-edge-int", () => { likes: [User!]! @relationship(type: "LIKES", direction: IN, properties: "Likes") } - interface Likes { + interface Likes @relationshipProperties { someInt: Int } `; @@ -248,7 +248,7 @@ describe("aggregations-where-edge-int", () => { likes: [User!]! @relationship(type: "LIKES", direction: IN, properties: "Likes") } - interface Likes { + interface Likes @relationshipProperties { someInt: Int } `; @@ -314,7 +314,7 @@ describe("aggregations-where-edge-int", () => { likes: [User!]! @relationship(type: "LIKES", direction: IN, properties: "Likes") } - interface Likes { + interface Likes @relationshipProperties { someInt: Int } `; @@ -377,7 +377,7 @@ describe("aggregations-where-edge-int", () => { likes: [User!]! @relationship(type: "LIKES", direction: IN, properties: "Likes") } - interface Likes { + interface Likes @relationshipProperties { someInt: Int } `; @@ -652,7 +652,7 @@ describe("aggregations-where-edge-int", () => { likes: [User!]! @relationship(type: "LIKES", direction: IN, properties: "Likes") } - interface Likes { + interface Likes @relationshipProperties { someInt: Int } `; diff --git a/packages/graphql/tests/integration/aggregations/where/edge/string.int.test.ts b/packages/graphql/tests/integration/aggregations/where/edge/string.int.test.ts index 40d8372a30..8aa6931f03 100644 --- a/packages/graphql/tests/integration/aggregations/where/edge/string.int.test.ts +++ b/packages/graphql/tests/integration/aggregations/where/edge/string.int.test.ts @@ -51,7 +51,7 @@ describe("aggregations-where-edge-string", () => { someStringAlias: String @alias(property: "_someStringAlias") } - interface Likes { + interface Likes @relationshipProperties { testString: String } `; @@ -118,7 +118,7 @@ describe("aggregations-where-edge-string", () => { likes: [User!]! @relationship(type: "LIKES", direction: IN, properties: "Likes") } - interface Likes { + interface Likes @relationshipProperties { testString: String } `; @@ -189,7 +189,7 @@ describe("aggregations-where-edge-string", () => { likes: [User!]! @relationship(type: "LIKES", direction: IN, properties: "Likes") } - interface Likes { + interface Likes @relationshipProperties { testString: String } `; @@ -259,7 +259,7 @@ describe("aggregations-where-edge-string", () => { likes: [User!]! @relationship(type: "LIKES", direction: IN, properties: "Likes") } - interface Likes { + interface Likes @relationshipProperties { testString: String } `; @@ -329,7 +329,7 @@ describe("aggregations-where-edge-string", () => { likes: [User!]! @relationship(type: "LIKES", direction: IN, properties: "Likes") } - interface Likes { + interface Likes @relationshipProperties { testString: String } `; @@ -402,7 +402,7 @@ describe("aggregations-where-edge-string", () => { likes: [User!]! @relationship(type: "LIKES", direction: IN, properties: "Likes") } - interface Likes { + interface Likes @relationshipProperties { testString: String } `; @@ -493,7 +493,7 @@ describe("aggregations-where-edge-string", () => { likes: [User!]! @relationship(type: "LIKES", direction: IN, properties: "Likes") } - interface Likes { + interface Likes @relationshipProperties { testString: String } `; @@ -584,7 +584,7 @@ describe("aggregations-where-edge-string", () => { likes: [User!]! @relationship(type: "LIKES", direction: IN, properties: "Likes") } - interface Likes { + interface Likes @relationshipProperties { testString: String } `; @@ -672,7 +672,7 @@ describe("aggregations-where-edge-string", () => { likes: [User!]! @relationship(type: "LIKES", direction: IN, properties: "Likes") } - interface Likes { + interface Likes @relationshipProperties { testString: String } `; @@ -760,7 +760,7 @@ describe("aggregations-where-edge-string", () => { likes: [User!]! @relationship(type: "LIKES", direction: IN, properties: "Likes") } - interface Likes { + interface Likes @relationshipProperties { testString: String } `; @@ -847,7 +847,7 @@ describe("aggregations-where-edge-string", () => { likes: [User!]! @relationship(type: "LIKES", direction: IN, properties: "Likes") } - interface Likes { + interface Likes @relationshipProperties { testString: String } `; @@ -935,7 +935,7 @@ describe("aggregations-where-edge-string", () => { likes: [User!]! @relationship(type: "LIKES", direction: IN, properties: "Likes") } - interface Likes { + interface Likes @relationshipProperties { testString: String } `; @@ -1024,7 +1024,7 @@ describe("aggregations-where-edge-string", () => { content: String likes: [${User}!]! @relationship(type: "LIKES", direction: IN, properties: "Likes") } - interface Likes { + interface Likes @relationshipProperties { someStringAlias: String @alias(property: "_someStringAlias") } `; diff --git a/packages/graphql/tests/integration/aggregations/where/mutations/update/connect-arg.int.test.ts b/packages/graphql/tests/integration/aggregations/where/mutations/update/connect-arg.int.test.ts index 904607b89e..ff522ca9ad 100644 --- a/packages/graphql/tests/integration/aggregations/where/mutations/update/connect-arg.int.test.ts +++ b/packages/graphql/tests/integration/aggregations/where/mutations/update/connect-arg.int.test.ts @@ -65,7 +65,7 @@ describe("Connect using aggregate where", () => { likes: [${userType.name}!]! @relationship(type: "LIKES", direction: IN, properties: "${likeInterface.name}") } - interface ${likeInterface.name} { + interface ${likeInterface.name} @relationshipProperties { likedAt: DateTime } `; @@ -396,7 +396,7 @@ describe("Connect UNIONs using aggregate where", () => { likes: [${userUnion.name}!]! @relationship(type: "LIKES", direction: IN, properties: "${likeInterface.name}") } - interface ${likeInterface.name} { + interface ${likeInterface.name} @relationshipProperties { likedAt: DateTime } `; diff --git a/packages/graphql/tests/integration/aggregations/where/mutations/update/disconnect-arg.int.test.ts b/packages/graphql/tests/integration/aggregations/where/mutations/update/disconnect-arg.int.test.ts index 3d7f88941a..e390be1cea 100644 --- a/packages/graphql/tests/integration/aggregations/where/mutations/update/disconnect-arg.int.test.ts +++ b/packages/graphql/tests/integration/aggregations/where/mutations/update/disconnect-arg.int.test.ts @@ -63,7 +63,7 @@ describe("Disconnect using aggregate where", () => { likes: [${userType.name}!]! @relationship(type: "LIKES", direction: IN, properties: "${likeInterface.name}") } - interface ${likeInterface.name} { + interface ${likeInterface.name} @relationshipProperties { likedAt: DateTime } `; @@ -315,7 +315,7 @@ describe("Disconnect UNIONs using aggregate where", () => { likes: [${userUnion.name}!]! @relationship(type: "LIKES", direction: IN, properties: "${likeInterface.name}") } - interface ${likeInterface.name} { + interface ${likeInterface.name} @relationshipProperties { likedAt: DateTime } `; diff --git a/packages/graphql/tests/integration/aggregations/where/mutations/update/update-arg.int.test.ts b/packages/graphql/tests/integration/aggregations/where/mutations/update/update-arg.int.test.ts index e0a785a93c..c12ea66339 100644 --- a/packages/graphql/tests/integration/aggregations/where/mutations/update/update-arg.int.test.ts +++ b/packages/graphql/tests/integration/aggregations/where/mutations/update/update-arg.int.test.ts @@ -65,7 +65,7 @@ describe("Update using aggregate where", () => { likes: [${userType.name}!]! @relationship(type: "LIKES", direction: IN, properties: "${likeInterface.name}") } - interface ${likeInterface.name} { + interface ${likeInterface.name} @relationshipProperties { likedAt: DateTime } `; diff --git a/packages/graphql/tests/integration/composite-where.int.test.ts b/packages/graphql/tests/integration/composite-where.int.test.ts index 0ec2b8a0e8..076bdb888a 100644 --- a/packages/graphql/tests/integration/composite-where.int.test.ts +++ b/packages/graphql/tests/integration/composite-where.int.test.ts @@ -50,7 +50,7 @@ describe("composite-where", () => { actors: [Actor!]! @relationship(type: "ACTED_IN", properties: "ActedIn", direction: IN) } - interface ActedIn { + interface ActedIn @relationshipProperties { screenTime: Int } `; @@ -139,7 +139,7 @@ describe("composite-where", () => { actors: [Actor!]! @relationship(type: "ACTED_IN", properties: "ActedIn", direction: IN) } - interface ActedIn { + interface ActedIn @relationshipProperties { screenTime: Int } `; diff --git a/packages/graphql/tests/integration/connect-or-create/create-connect-or-create.int.test.ts b/packages/graphql/tests/integration/connect-or-create/create-connect-or-create.int.test.ts index 96b0e37424..52f6f16eb2 100644 --- a/packages/graphql/tests/integration/connect-or-create/create-connect-or-create.int.test.ts +++ b/packages/graphql/tests/integration/connect-or-create/create-connect-or-create.int.test.ts @@ -54,7 +54,7 @@ describe("Create -> ConnectOrCreate", () => { ${typeMovie.plural}: [${typeMovie.name}!]! @relationship(type: "ACTED_IN", direction: OUT, properties:"ActedIn") } - interface ActedIn { + interface ActedIn @relationshipProperties { screentime: Int } `; diff --git a/packages/graphql/tests/integration/connect-or-create/update-connect-or-create-top-level.int.test.ts b/packages/graphql/tests/integration/connect-or-create/update-connect-or-create-top-level.int.test.ts index 63081ce23f..d7e40bf72f 100644 --- a/packages/graphql/tests/integration/connect-or-create/update-connect-or-create-top-level.int.test.ts +++ b/packages/graphql/tests/integration/connect-or-create/update-connect-or-create-top-level.int.test.ts @@ -53,7 +53,7 @@ describe("Update -> ConnectOrCreate Top Level", () => { ${typeMovie.plural}: [${typeMovie.name}!]! @relationship(type: "ACTED_IN", direction: OUT, properties:"ActedIn") } - interface ActedIn { + interface ActedIn @relationshipProperties { screentime: Int } `; diff --git a/packages/graphql/tests/integration/connect-or-create/update-connect-or-create.int.test.ts b/packages/graphql/tests/integration/connect-or-create/update-connect-or-create.int.test.ts index 677feecd46..49089c6c71 100644 --- a/packages/graphql/tests/integration/connect-or-create/update-connect-or-create.int.test.ts +++ b/packages/graphql/tests/integration/connect-or-create/update-connect-or-create.int.test.ts @@ -53,7 +53,7 @@ describe("Update -> ConnectOrCreate", () => { ${typeMovie.plural}: [${typeMovie.name}!]! @relationship(type: "ACTED_IN", direction: OUT, properties:"ActedIn") } - interface ActedIn { + interface ActedIn @relationshipProperties { screentime: Int } `; diff --git a/packages/graphql/tests/integration/connection-resolvers-int.test.ts b/packages/graphql/tests/integration/connection-resolvers-int.test.ts index b30a88c2c3..f28b6ef67b 100644 --- a/packages/graphql/tests/integration/connection-resolvers-int.test.ts +++ b/packages/graphql/tests/integration/connection-resolvers-int.test.ts @@ -53,7 +53,7 @@ describe("Connection Resolvers", () => { actors: [Actor!]! @relationship(type: "ACTED_IN", direction: IN, properties: "ActedIn") } - interface ActedIn { + interface ActedIn @relationshipProperties { screenTime: Int! } `; @@ -161,7 +161,7 @@ describe("Connection Resolvers", () => { actors: [Actor!]! @relationship(type: "ACTED_IN", direction: IN, properties: "ActedIn") } - interface ActedIn { + interface ActedIn @relationshipProperties { screenTime: Int! } `; diff --git a/packages/graphql/tests/integration/connections/alias.int.test.ts b/packages/graphql/tests/integration/connections/alias.int.test.ts index 63e9b86b74..67bd9d35aa 100644 --- a/packages/graphql/tests/integration/connections/alias.int.test.ts +++ b/packages/graphql/tests/integration/connections/alias.int.test.ts @@ -723,7 +723,7 @@ describe("Connections Alias", () => { movies: [${typeMovie.name}!]! @relationship(type: "ACTED_IN", direction: OUT, properties: "ActedIn") } - interface ActedIn { + interface ActedIn @relationshipProperties { roles: [String]! } `; @@ -786,7 +786,7 @@ describe("Connections Alias", () => { name: String! } - interface ActedIn { + interface ActedIn @relationshipProperties { roles: [String]! } `; @@ -957,7 +957,7 @@ describe("Connections Alias", () => { movies: [${typeMovie.name}!]! @relationship(type: "ACTED_IN", properties: "ActedIn", direction: OUT) } - interface ActedIn { + interface ActedIn @relationshipProperties { screenTime: Int! } `; diff --git a/packages/graphql/tests/integration/connections/enums.int.test.ts b/packages/graphql/tests/integration/connections/enums.int.test.ts index d05fdfd200..a50549b52e 100644 --- a/packages/graphql/tests/integration/connections/enums.int.test.ts +++ b/packages/graphql/tests/integration/connections/enums.int.test.ts @@ -60,7 +60,7 @@ describe("Enum Relationship Properties", () => { SUPPORTING } - interface ActedIn { + interface ActedIn @relationshipProperties { roleType: RoleType! } `; diff --git a/packages/graphql/tests/integration/connections/nested.int.test.ts b/packages/graphql/tests/integration/connections/nested.int.test.ts index 444b3f0d06..e25af31d98 100644 --- a/packages/graphql/tests/integration/connections/nested.int.test.ts +++ b/packages/graphql/tests/integration/connections/nested.int.test.ts @@ -59,7 +59,7 @@ describe("Connections Alias", () => { movies: [${typeMovie}!]! @relationship(type: "ACTED_IN", properties: "ActedIn", direction: OUT) } - interface ActedIn { + interface ActedIn @relationshipProperties { screenTime: Int! } `; diff --git a/packages/graphql/tests/integration/connections/unions.int.test.ts b/packages/graphql/tests/integration/connections/unions.int.test.ts index b174dcc09c..c22aae4f09 100644 --- a/packages/graphql/tests/integration/connections/unions.int.test.ts +++ b/packages/graphql/tests/integration/connections/unions.int.test.ts @@ -46,7 +46,7 @@ describe("Connections -> Unions", () => { author: [Author!]! @relationship(type: "WROTE", direction: IN, properties: "Wrote") } - interface Wrote { + interface Wrote @relationshipProperties { words: Int! } `; diff --git a/packages/graphql/tests/integration/deprecated/rfc-autogenerated-properties-rel.int.test.ts b/packages/graphql/tests/integration/deprecated/rfc-autogenerated-properties-rel.int.test.ts index 6e81e584ba..35cefa6353 100644 --- a/packages/graphql/tests/integration/deprecated/rfc-autogenerated-properties-rel.int.test.ts +++ b/packages/graphql/tests/integration/deprecated/rfc-autogenerated-properties-rel.int.test.ts @@ -58,7 +58,7 @@ describe("integration/rfc/autogenerate-properties-rel", () => { ) } - interface RelProperties { + interface RelProperties @relationshipProperties { id: ID! callback: String! @callback(operations: [CREATE], name: "callback") } @@ -168,7 +168,7 @@ describe("integration/rfc/autogenerate-properties-rel", () => { ) } - interface RelProperties { + interface RelProperties @relationshipProperties { id: ID! callback: String! @callback(operations: [UPDATE], name: "callback") } @@ -296,7 +296,7 @@ describe("integration/rfc/autogenerate-properties-rel", () => { ) } - interface RelProperties { + interface RelProperties @relationshipProperties { id: ID! callback: String! @callback(operations: [CREATE, UPDATE], name: "callback") } @@ -453,7 +453,7 @@ describe("integration/rfc/autogenerate-properties-rel", () => { ) } - interface RelProperties { + interface RelProperties @relationshipProperties { id: ID! callback: Int! @callback(operations: [CREATE], name: "callback") } @@ -566,7 +566,7 @@ describe("integration/rfc/autogenerate-properties-rel", () => { ) } - interface RelProperties { + interface RelProperties @relationshipProperties { id: ID! callback: Int! @callback(operations: [UPDATE], name: "callback") } @@ -700,7 +700,7 @@ describe("integration/rfc/autogenerate-properties-rel", () => { ) } - interface RelProperties { + interface RelProperties @relationshipProperties { id: ID! callback: Int! @callback(operations: [CREATE, UPDATE], name: "callback") } @@ -850,7 +850,7 @@ describe("integration/rfc/autogenerate-properties-rel", () => { ) } - interface RelProperties { + interface RelProperties @relationshipProperties { id: ID! title: String! slug: String! @callback(operations: [CREATE], name: "callback") @@ -963,7 +963,7 @@ describe("integration/rfc/autogenerate-properties-rel", () => { ) } - interface RelProperties { + interface RelProperties @relationshipProperties { id: ID! title: String! slug: String! @callback(operations: [UPDATE], name: "callback") diff --git a/packages/graphql/tests/integration/directives/alias.int.test.ts b/packages/graphql/tests/integration/directives/alias.int.test.ts index 8417c44142..718c5a5ea3 100644 --- a/packages/graphql/tests/integration/directives/alias.int.test.ts +++ b/packages/graphql/tests/integration/directives/alias.int.test.ts @@ -60,7 +60,7 @@ describe("@alias directive", () => { createdAt: DateTime! @timestamp(operations: [CREATE]) @alias(property: "dbCreatedAt") } - interface AliasDirectiveTestLikesProps { + interface AliasDirectiveTestLikesProps @relationshipProperties { comment: String! @alias(property: "dbComment") relationshipCreatedAt: DateTime! @timestamp(operations: [CREATE]) @alias(property: "dbCreatedAt") } diff --git a/packages/graphql/tests/integration/directives/id.int.test.ts b/packages/graphql/tests/integration/directives/id.int.test.ts index 7485358d72..69b18418cb 100644 --- a/packages/graphql/tests/integration/directives/id.int.test.ts +++ b/packages/graphql/tests/integration/directives/id.int.test.ts @@ -192,7 +192,7 @@ describe("@id directive", () => { name: String! } - interface ActedIn { + interface ActedIn @relationshipProperties { id: ID! @id screenTime: Int! } diff --git a/packages/graphql/tests/integration/directives/populatedBy.int.test.ts b/packages/graphql/tests/integration/directives/populatedBy.int.test.ts index 38898f2943..cc495ea838 100644 --- a/packages/graphql/tests/integration/directives/populatedBy.int.test.ts +++ b/packages/graphql/tests/integration/directives/populatedBy.int.test.ts @@ -829,7 +829,7 @@ describe("@populatedBy directive", () => { ) } - interface RelProperties { + interface RelProperties @relationshipProperties { id: ID! callback: String! @populatedBy(operations: [CREATE], callback: "callback") } @@ -939,7 +939,7 @@ describe("@populatedBy directive", () => { ) } - interface RelProperties { + interface RelProperties @relationshipProperties { id: ID! callback: String! @populatedBy(operations: [UPDATE], callback: "callback") } @@ -1067,7 +1067,7 @@ describe("@populatedBy directive", () => { ) } - interface RelProperties { + interface RelProperties @relationshipProperties { id: ID! callback: String! @populatedBy(operations: [CREATE, UPDATE], callback: "callback") } @@ -1224,7 +1224,7 @@ describe("@populatedBy directive", () => { ) } - interface RelProperties { + interface RelProperties @relationshipProperties { id: ID! callback: Int! @populatedBy(operations: [CREATE], callback: "callback") } @@ -1337,7 +1337,7 @@ describe("@populatedBy directive", () => { ) } - interface RelProperties { + interface RelProperties @relationshipProperties { id: ID! callback: Int! @populatedBy(operations: [UPDATE], callback: "callback") } @@ -1471,7 +1471,7 @@ describe("@populatedBy directive", () => { ) } - interface RelProperties { + interface RelProperties @relationshipProperties { id: ID! callback: Int! @populatedBy(operations: [CREATE, UPDATE], callback: "callback") } @@ -1621,7 +1621,7 @@ describe("@populatedBy directive", () => { ) } - interface RelProperties { + interface RelProperties @relationshipProperties { id: ID! title: String! slug: String! @populatedBy(operations: [CREATE], callback: "callback") @@ -1734,7 +1734,7 @@ describe("@populatedBy directive", () => { ) } - interface RelProperties { + interface RelProperties @relationshipProperties { id: ID! title: String! slug: String! @populatedBy(operations: [UPDATE], callback: "callback") diff --git a/packages/graphql/tests/integration/directives/timestamp/datetime.int.test.ts b/packages/graphql/tests/integration/directives/timestamp/datetime.int.test.ts index 33cd960ef3..2be40b4c99 100644 --- a/packages/graphql/tests/integration/directives/timestamp/datetime.int.test.ts +++ b/packages/graphql/tests/integration/directives/timestamp/datetime.int.test.ts @@ -99,7 +99,7 @@ describe("timestamp/datetime", () => { name: String! } - interface ActedIn { + interface ActedIn @relationshipProperties { createdAt: DateTime! @timestamp(operations: [CREATE]) screenTime: Int! } @@ -223,7 +223,7 @@ describe("timestamp/datetime", () => { name: String! } - interface ActedIn { + interface ActedIn @relationshipProperties { updatedAt: DateTime! @timestamp(operations: [UPDATE]) screenTime: Int! } @@ -349,7 +349,7 @@ describe("timestamp/datetime", () => { name: String! } - interface ActedIn { + interface ActedIn @relationshipProperties { createdAt: DateTime! @timestamp(operations: [CREATE, UPDATE]) screenTime: Int! } @@ -413,7 +413,7 @@ describe("timestamp/datetime", () => { name: String! } - interface ActedIn { + interface ActedIn @relationshipProperties { updatedAt: DateTime! @timestamp(operations: [CREATE, UPDATE]) screenTime: Int! } @@ -597,7 +597,7 @@ describe("timestamp/datetime", () => { name: String! } - interface ActedIn { + interface ActedIn @relationshipProperties { createdAt: DateTime! @timestamp screenTime: Int! } @@ -661,7 +661,7 @@ describe("timestamp/datetime", () => { name: String! } - interface ActedIn { + interface ActedIn @relationshipProperties { updatedAt: DateTime! @timestamp screenTime: Int! } diff --git a/packages/graphql/tests/integration/directives/timestamp/time.int.test.ts b/packages/graphql/tests/integration/directives/timestamp/time.int.test.ts index 7699dc8c82..527afda46f 100644 --- a/packages/graphql/tests/integration/directives/timestamp/time.int.test.ts +++ b/packages/graphql/tests/integration/directives/timestamp/time.int.test.ts @@ -99,7 +99,7 @@ describe("timestamp/time", () => { name: String! } - interface ActedIn { + interface ActedIn @relationshipProperties { createdAt: Time! @timestamp(operations: [CREATE]) screenTime: Int! } @@ -232,7 +232,7 @@ describe("timestamp/time", () => { name: String! } - interface ActedIn { + interface ActedIn @relationshipProperties { updatedAt: Time! @timestamp(operations: [UPDATE]) screenTime: Int! } @@ -366,7 +366,7 @@ describe("timestamp/time", () => { name: String! } - interface ActedIn { + interface ActedIn @relationshipProperties { createdAt: Time! @timestamp(operations: [CREATE, UPDATE]) screenTime: Int! } @@ -442,7 +442,7 @@ describe("timestamp/time", () => { name: String! } - interface ActedIn { + interface ActedIn @relationshipProperties { updatedAt: Time! @timestamp(operations: [CREATE, UPDATE]) screenTime: Int! } @@ -631,7 +631,7 @@ describe("timestamp/time", () => { name: String! } - interface ActedIn { + interface ActedIn @relationshipProperties { createdAt: Time! @timestamp screenTime: Int! } @@ -706,7 +706,7 @@ describe("timestamp/time", () => { name: String! } - interface ActedIn { + interface ActedIn @relationshipProperties { updatedAt: Time! @timestamp screenTime: Int! } diff --git a/packages/graphql/tests/integration/issues/1150.int.test.ts b/packages/graphql/tests/integration/issues/1150.int.test.ts index 99b5ac6472..06823f893b 100644 --- a/packages/graphql/tests/integration/issues/1150.int.test.ts +++ b/packages/graphql/tests/integration/issues/1150.int.test.ts @@ -65,7 +65,7 @@ describe("https://github.com/neo4j/graphql/issues/1150", () => { @relationship(type: "HAS", properties: "RelationProps", direction: OUT) } - interface RelationProps { + interface RelationProps @relationshipProperties { current: Boolean! } `; diff --git a/packages/graphql/tests/integration/issues/1221.int.test.ts b/packages/graphql/tests/integration/issues/1221.int.test.ts index 6851f4380b..414e0535b2 100644 --- a/packages/graphql/tests/integration/issues/1221.int.test.ts +++ b/packages/graphql/tests/integration/issues/1221.int.test.ts @@ -46,7 +46,7 @@ describe("https://github.com/neo4j/graphql/issues/1221", () => { fullName: String! } - interface RelationProps { + interface RelationProps @relationshipProperties { current: Boolean! } diff --git a/packages/graphql/tests/integration/issues/1782.int.test.ts b/packages/graphql/tests/integration/issues/1782.int.test.ts index a86be79a01..13e082770a 100644 --- a/packages/graphql/tests/integration/issues/1782.int.test.ts +++ b/packages/graphql/tests/integration/issues/1782.int.test.ts @@ -48,7 +48,7 @@ describe("https://github.com/neo4j/graphql/issues/1782", () => { fullName: String! } - interface RelationProps { + interface RelationProps @relationshipProperties { current: Boolean! } diff --git a/packages/graphql/tests/integration/issues/1783.int.test.ts b/packages/graphql/tests/integration/issues/1783.int.test.ts index 2e4dff66d0..97ecf4ace5 100644 --- a/packages/graphql/tests/integration/issues/1783.int.test.ts +++ b/packages/graphql/tests/integration/issues/1783.int.test.ts @@ -46,7 +46,7 @@ describe("https://github.com/neo4j/graphql/issues/1783", () => { fullName: String! } - interface RelationProps { + interface RelationProps @relationshipProperties { current: Boolean! } diff --git a/packages/graphql/tests/integration/issues/2249.int.test.ts b/packages/graphql/tests/integration/issues/2249.int.test.ts index 63f6967a41..bd764a20c7 100644 --- a/packages/graphql/tests/integration/issues/2249.int.test.ts +++ b/packages/graphql/tests/integration/issues/2249.int.test.ts @@ -51,7 +51,7 @@ describe("https://github.com/neo4j/graphql/issues/2249", () => { imdbId: Int @unique } - interface Review { + interface Review @relationshipProperties { score: Int! } diff --git a/packages/graphql/tests/integration/issues/2662.int.test.ts b/packages/graphql/tests/integration/issues/2662.int.test.ts index 954b82d583..25c36dec6e 100644 --- a/packages/graphql/tests/integration/issues/2662.int.test.ts +++ b/packages/graphql/tests/integration/issues/2662.int.test.ts @@ -65,7 +65,7 @@ describe("https://github.com/neo4j/graphql/issues/2662", () => { content: String! likes: [${userType}!]! @relationship(type: "LIKES", direction: IN, properties: "${likesInterface}") } - interface ${likesInterface} { + interface ${likesInterface} @relationshipProperties { someString: String } `; @@ -845,7 +845,7 @@ describe("https://github.com/neo4j/graphql/issues/2662", () => { someProperty: Int! likes: [${userType}!]! @relationship(type: "LIKES", direction: IN, properties: "${likesInterface}") } - interface ${likesInterface} { + interface ${likesInterface} @relationshipProperties { someProperty: String! } `; diff --git a/packages/graphql/tests/integration/issues/2669.int.test.ts b/packages/graphql/tests/integration/issues/2669.int.test.ts index e644e59b45..c534bf29fd 100644 --- a/packages/graphql/tests/integration/issues/2669.int.test.ts +++ b/packages/graphql/tests/integration/issues/2669.int.test.ts @@ -50,7 +50,7 @@ describe("https://github.com/neo4j/graphql/issues/2669", () => { movies: [${typeMovie.name}!]! @relationship(type: "ACTED_IN", direction: OUT, properties: "ActedIn") } - interface ActedIn { + interface ActedIn @relationshipProperties { time: Int @alias(property: "screentime") } `; diff --git a/packages/graphql/tests/integration/issues/2670.int.test.ts b/packages/graphql/tests/integration/issues/2670.int.test.ts index 05a368fcd5..0711a570ab 100644 --- a/packages/graphql/tests/integration/issues/2670.int.test.ts +++ b/packages/graphql/tests/integration/issues/2670.int.test.ts @@ -81,7 +81,7 @@ describe("https://github.com/neo4j/graphql/issues/2670", () => { genres: [${genreType.name}!]! @relationship(type: "IN_GENRE", direction: OUT, properties: "${inGenreInterface.name}") } - interface ${inGenreInterface.name} { + interface ${inGenreInterface.name} @relationshipProperties { intValue: Int! } `; diff --git a/packages/graphql/tests/integration/issues/2708.int.test.ts b/packages/graphql/tests/integration/issues/2708.int.test.ts index a2807dc7a4..8d26121583 100644 --- a/packages/graphql/tests/integration/issues/2708.int.test.ts +++ b/packages/graphql/tests/integration/issues/2708.int.test.ts @@ -81,7 +81,7 @@ describe("https://github.com/neo4j/graphql/issues/2708", () => { genres: [${genreType.name}!]! @relationship(type: "IN_GENRE", direction: OUT, properties: "${inGenreInterface.name}") } - interface ${inGenreInterface.name} { + interface ${inGenreInterface.name} @relationshipProperties { intValue: Int! } `; diff --git a/packages/graphql/tests/integration/issues/2713.int.test.ts b/packages/graphql/tests/integration/issues/2713.int.test.ts index 7facbd4623..2e3ab98f55 100644 --- a/packages/graphql/tests/integration/issues/2713.int.test.ts +++ b/packages/graphql/tests/integration/issues/2713.int.test.ts @@ -68,7 +68,7 @@ describe("https://github.com/neo4j/graphql/issues/2713", () => { movies: [${movieType.name}!]! @relationship(type: "IN_GENRE", direction: IN, properties: "${inGenreInterface.name}") } - interface ${inGenreInterface.name} { + interface ${inGenreInterface.name} @relationshipProperties { intValue: Int! } `; diff --git a/packages/graphql/tests/integration/issues/369.int.test.ts b/packages/graphql/tests/integration/issues/369.int.test.ts index 2c84ea8fcd..6a53b707e0 100644 --- a/packages/graphql/tests/integration/issues/369.int.test.ts +++ b/packages/graphql/tests/integration/issues/369.int.test.ts @@ -47,7 +47,7 @@ describe("369", () => { dependeFrom: [Dato!]! @relationship(type: "DEPENDE", direction: IN, properties: "Depende") } - interface Depende { + interface Depende @relationshipProperties { uuid: ID } @@ -132,7 +132,7 @@ describe("369", () => { dependeFrom: [Dato!]! @relationship(type: "DEPENDE", direction: IN, properties: "Depende") } - interface Depende { + interface Depende @relationshipProperties { uuid: ID } diff --git a/packages/graphql/tests/integration/issues/988.int.test.ts b/packages/graphql/tests/integration/issues/988.int.test.ts index 6a9f0a8eb8..2a9bf57425 100644 --- a/packages/graphql/tests/integration/issues/988.int.test.ts +++ b/packages/graphql/tests/integration/issues/988.int.test.ts @@ -57,7 +57,7 @@ describe("https://github.com/neo4j/graphql/issues/988", () => { current: Boolean! } - interface RelationProps { + interface RelationProps @relationshipProperties { current: Boolean! } `; diff --git a/packages/graphql/tests/integration/relationship-properties/connect-overwrite.int.test.ts b/packages/graphql/tests/integration/relationship-properties/connect-overwrite.int.test.ts index 18d5bfc539..26b0724f60 100644 --- a/packages/graphql/tests/integration/relationship-properties/connect-overwrite.int.test.ts +++ b/packages/graphql/tests/integration/relationship-properties/connect-overwrite.int.test.ts @@ -70,10 +70,10 @@ describe("Relationship properties - connect with and without `overwrite` argumen directed: [ ${typeMovie.name}!]! @relationship(type: "DIRECTED", properties: "Directed", direction: OUT) } - interface ActedIn { + interface ActedIn @relationshipProperties { screenTime: Int! } - interface Directed { + interface Directed @relationshipProperties { year: Int! } `; @@ -312,7 +312,7 @@ describe("Relationship properties - connect with and without `overwrite` argumen movies: [${typeMovie.name}!]! @relationship(type: "ACTED_IN", properties: "ActedIn", direction: OUT) } - interface ActedIn { + interface ActedIn @relationshipProperties { screenTime: Int! } `; @@ -709,7 +709,7 @@ describe("Relationship properties - connect with and without `overwrite` argumen movies: [${typeMovie.name}!]! @relationship(type: "ACTED_IN", properties: "ActedIn", direction: OUT) } - interface ActedIn { + interface ActedIn @relationshipProperties { screenTime: Int! } `; @@ -1352,7 +1352,7 @@ describe("Relationship properties - connect with and without `overwrite` argumen directed: [${typeMovie.name}!]! @relationship(type: "DIRECTED", properties: "Directed", direction: OUT) } - interface Directed { + interface Directed @relationshipProperties { year: Int! } `; diff --git a/packages/graphql/tests/integration/relationship-properties/connect.int.test.ts b/packages/graphql/tests/integration/relationship-properties/connect.int.test.ts index e05e6d09b4..292579e866 100644 --- a/packages/graphql/tests/integration/relationship-properties/connect.int.test.ts +++ b/packages/graphql/tests/integration/relationship-properties/connect.int.test.ts @@ -49,7 +49,7 @@ describe("Relationship properties - connect", () => { movies: [Movie!]! @relationship(type: "ACTED_IN", properties: "ActedIn", direction: OUT) } - interface ActedIn { + interface ActedIn @relationshipProperties { screenTime: Int! } `; @@ -147,7 +147,7 @@ describe("Relationship properties - connect", () => { union ActedInUnion = Movie | Show - interface ActedInInterface { + interface ActedInInterface @relationshipProperties { screenTime: Int! } `; @@ -232,7 +232,7 @@ describe("Relationship properties - connect", () => { movies: [Movie!]! @relationship(type: "ACTED_IN", properties: "ActedIn", direction: OUT) } - interface ActedIn { + interface ActedIn @relationshipProperties { screenTime: Int! } `; @@ -323,7 +323,7 @@ describe("Relationship properties - connect", () => { @relationship(type: "ACTED_IN", properties: "ActedInInterface", direction: OUT) } union ActedInUnion = Movie | Show - interface ActedInInterface { + interface ActedInInterface @relationshipProperties { screenTime: Int! } `; diff --git a/packages/graphql/tests/integration/relationship-properties/create.int.test.ts b/packages/graphql/tests/integration/relationship-properties/create.int.test.ts index 46f2dfbfcf..bdf378ea24 100644 --- a/packages/graphql/tests/integration/relationship-properties/create.int.test.ts +++ b/packages/graphql/tests/integration/relationship-properties/create.int.test.ts @@ -49,7 +49,7 @@ describe("Relationship properties - create", () => { movies: [Movie!]! @relationship(type: "ACTED_IN", properties: "ActedIn", direction: OUT) } - interface ActedIn { + interface ActedIn @relationshipProperties { screenTime: Int! } `; @@ -135,7 +135,7 @@ describe("Relationship properties - create", () => { publications: [Publication!]! @relationship(type: "WROTE", properties: "Wrote", direction: OUT) } - interface Wrote { + interface Wrote @relationshipProperties { words: Int! } `; diff --git a/packages/graphql/tests/integration/relationship-properties/delete.int.test.ts b/packages/graphql/tests/integration/relationship-properties/delete.int.test.ts index a11aab9553..7a48cb8ad2 100644 --- a/packages/graphql/tests/integration/relationship-properties/delete.int.test.ts +++ b/packages/graphql/tests/integration/relationship-properties/delete.int.test.ts @@ -49,7 +49,7 @@ describe("Relationship properties - delete", () => { movies: [Movie!]! @relationship(type: "ACTED_IN", properties: "ActedIn", direction: OUT) } - interface ActedIn { + interface ActedIn @relationshipProperties { screenTime: Int! } `; @@ -134,7 +134,7 @@ describe("Relationship properties - delete", () => { union ActedInUnion = Movie | Show - interface ActedInInterface { + interface ActedInInterface @relationshipProperties { screenTime: Int! } `; diff --git a/packages/graphql/tests/integration/relationship-properties/disconnect.int.test.ts b/packages/graphql/tests/integration/relationship-properties/disconnect.int.test.ts index 7276ee3c36..c0e70362a7 100644 --- a/packages/graphql/tests/integration/relationship-properties/disconnect.int.test.ts +++ b/packages/graphql/tests/integration/relationship-properties/disconnect.int.test.ts @@ -49,7 +49,7 @@ describe("Relationship properties - disconnect", () => { movies: [Movie!]! @relationship(type: "ACTED_IN", properties: "ActedIn", direction: OUT) } - interface ActedIn { + interface ActedIn @relationshipProperties { screenTime: Int! } `; @@ -136,7 +136,7 @@ describe("Relationship properties - disconnect", () => { union ActedInUnion = Movie | Show - interface ActedInInterface { + interface ActedInInterface @relationshipProperties { screenTime: Int! } `; diff --git a/packages/graphql/tests/integration/relationship-properties/error-if-missing-relationship-properties.int.test.ts b/packages/graphql/tests/integration/relationship-properties/error-if-missing-relationship-properties.int.test.ts new file mode 100644 index 0000000000..a38f0dd8f3 --- /dev/null +++ b/packages/graphql/tests/integration/relationship-properties/error-if-missing-relationship-properties.int.test.ts @@ -0,0 +1,85 @@ +/* + * 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 type { Driver } from "neo4j-driver"; +import { gql } from "apollo-server"; +import Neo4j from "../neo4j"; +import { Neo4jGraphQL } from "../../../src/classes"; + +describe("Throw error if missing @relationshipProperties", () => { + let driver: Driver; + let neo4j: Neo4j; + + beforeAll(async () => { + neo4j = new Neo4j(); + driver = await neo4j.getDriver(); + }); + + afterAll(async () => { + await driver.close(); + }); + + test("should throw error if the @relationshipProperties directive is not used", async () => { + const typeDefs = gql` + type Movie { + title: String! + actors: [Actor!]! @relationship(type: "ACTED_IN", properties: "ActedIn", direction: IN) + } + + type Actor { + name: String! + movies: [Movie!]! @relationship(type: "ACTED_IN", properties: "ActedIn", direction: OUT) + } + + interface ActedIn { + screenTime: Int! + } + `; + + const neoSchema = new Neo4jGraphQL({ typeDefs, driver }); + + await expect(neoSchema.getSchema()).rejects.toThrow( + "The `@relationshipProperties` directive could not be found on the `ActedIn` interface" + ); + }); + + test("should not throw error if the @relationshipProperties directive is used", async () => { + const typeDefs = gql` + type Movie { + title: String! + actors: [Actor!]! @relationship(type: "ACTED_IN", properties: "ActedIn", direction: IN) + } + + type Actor { + name: String! + movies: [Movie!]! @relationship(type: "ACTED_IN", properties: "ActedIn", direction: OUT) + } + + interface ActedIn @relationshipProperties { + screenTime: Int! + } + `; + + const neoSchema = new Neo4jGraphQL({ typeDefs, driver }); + + await expect(neoSchema.getSchema()).resolves.not.toThrow( + "The `@relationshipProperties` directive could not be found on the `ActedIn` interface" + ); + }); +}); diff --git a/packages/graphql/tests/integration/relationship-properties/read.int.test.ts b/packages/graphql/tests/integration/relationship-properties/read.int.test.ts index 5805afe743..c141871112 100644 --- a/packages/graphql/tests/integration/relationship-properties/read.int.test.ts +++ b/packages/graphql/tests/integration/relationship-properties/read.int.test.ts @@ -77,7 +77,7 @@ describe("Relationship properties - read", () => { movies: [${typeMovie.name}!]! @relationship(type: "ACTED_IN", properties: "ActedIn", direction: OUT) } - interface ActedIn { + interface ActedIn @relationshipProperties { screenTime: Int! } `; diff --git a/packages/graphql/tests/integration/relationship-properties/update.int.test.ts b/packages/graphql/tests/integration/relationship-properties/update.int.test.ts index 8d6aadfce6..637b8babea 100644 --- a/packages/graphql/tests/integration/relationship-properties/update.int.test.ts +++ b/packages/graphql/tests/integration/relationship-properties/update.int.test.ts @@ -39,7 +39,7 @@ describe("Relationship properties - update", () => { movies: [Movie!]! @relationship(type: "ACTED_IN", properties: "ActedIn", direction: OUT) } - interface ActedIn { + interface ActedIn @relationshipProperties { screenTime: Int! } `; diff --git a/packages/graphql/tests/integration/subscriptions/create-relationship/create.int.test.ts b/packages/graphql/tests/integration/subscriptions/create-relationship/create.int.test.ts index b0d173b475..fd53738ce6 100644 --- a/packages/graphql/tests/integration/subscriptions/create-relationship/create.int.test.ts +++ b/packages/graphql/tests/integration/subscriptions/create-relationship/create.int.test.ts @@ -73,7 +73,7 @@ describe("Subscriptions connect with create", () => { year: Int! } - interface Review { + interface Review @relationshipProperties { score: Int! } diff --git a/packages/graphql/tests/integration/subscriptions/create-relationship/delete.int.test.ts b/packages/graphql/tests/integration/subscriptions/create-relationship/delete.int.test.ts index 6818b3a6d2..cdd99326c9 100644 --- a/packages/graphql/tests/integration/subscriptions/create-relationship/delete.int.test.ts +++ b/packages/graphql/tests/integration/subscriptions/create-relationship/delete.int.test.ts @@ -74,7 +74,7 @@ describe("Subscriptions connect with delete", () => { year: Int! } - interface Review { + interface Review @relationshipProperties { score: Int! } diff --git a/packages/graphql/tests/integration/subscriptions/create/connect-or-create.int.test.ts b/packages/graphql/tests/integration/subscriptions/create/connect-or-create.int.test.ts index b7b829d9aa..e2a195965f 100644 --- a/packages/graphql/tests/integration/subscriptions/create/connect-or-create.int.test.ts +++ b/packages/graphql/tests/integration/subscriptions/create/connect-or-create.int.test.ts @@ -56,7 +56,7 @@ describe("Create -> ConnectOrCreate", () => { ${typeMovie.plural}: [${typeMovie.name}!]! @relationship(type: "ACTED_IN", direction: OUT, properties:"ActedIn") } - interface ActedIn { + interface ActedIn @relationshipProperties { screentime: Int } `; diff --git a/packages/graphql/tests/schema/aggregations.test.ts b/packages/graphql/tests/schema/aggregations.test.ts index b5c7cf9b1a..1039ba053e 100644 --- a/packages/graphql/tests/schema/aggregations.test.ts +++ b/packages/graphql/tests/schema/aggregations.test.ts @@ -412,7 +412,7 @@ describe("Aggregations", () => { likes: [User!]! @relationship(type: "LIKES", direction: IN, properties: "Likes") } - interface Likes { + interface Likes @relationshipProperties { someId: ID someString: String someFloat: Float diff --git a/packages/graphql/tests/schema/connect-or-create.test.ts b/packages/graphql/tests/schema/connect-or-create.test.ts index d4cf3a8bfd..3883ba6d25 100644 --- a/packages/graphql/tests/schema/connect-or-create.test.ts +++ b/packages/graphql/tests/schema/connect-or-create.test.ts @@ -512,7 +512,7 @@ describe("Connect Or Create", () => { movies: [Movie!]! @relationship(type: "ACTED_IN", direction: OUT, properties: "ActedIn") } - interface ActedIn { + interface ActedIn @relationshipProperties { screentime: Int! characterName: String } diff --git a/packages/graphql/tests/schema/connections/enums.test.ts b/packages/graphql/tests/schema/connections/enums.test.ts index 28177333dc..53864b8721 100644 --- a/packages/graphql/tests/schema/connections/enums.test.ts +++ b/packages/graphql/tests/schema/connections/enums.test.ts @@ -40,7 +40,7 @@ describe("Enums", () => { SUPPORTING } - interface ActedIn { + interface ActedIn @relationshipProperties { roleType: RoleType! } `; diff --git a/packages/graphql/tests/schema/connections/unions.test.ts b/packages/graphql/tests/schema/connections/unions.test.ts index 364402d781..33555b5a5e 100644 --- a/packages/graphql/tests/schema/connections/unions.test.ts +++ b/packages/graphql/tests/schema/connections/unions.test.ts @@ -42,7 +42,7 @@ describe("Unions", () => { author: [Author!]! @relationship(type: "WROTE", direction: IN, properties: "Wrote") } - interface Wrote { + interface Wrote @relationshipProperties { words: Int! } `; diff --git a/packages/graphql/tests/schema/deprecated/rfc-autogenerated-properties-rel.test.ts b/packages/graphql/tests/schema/deprecated/rfc-autogenerated-properties-rel.test.ts index 2f60148a49..9120b04f3b 100644 --- a/packages/graphql/tests/schema/deprecated/rfc-autogenerated-properties-rel.test.ts +++ b/packages/graphql/tests/schema/deprecated/rfc-autogenerated-properties-rel.test.ts @@ -31,7 +31,7 @@ describe("schema/rfc/autogenerate-properties-rel", () => { genres: [Genre!]! @relationship(type: "IN_GENRE", direction: OUT, properties: "RelProperties") } - interface RelProperties { + interface RelProperties @relationshipProperties { id: ID! callback1: String! @callback(operations: [CREATE], name: "callback4") @default(value: "Test") } @@ -57,7 +57,7 @@ describe("schema/rfc/autogenerate-properties-rel", () => { genres: [Genre!]! @relationship(type: "IN_GENRE", direction: OUT, properties: "RelProperties") } - interface RelProperties { + interface RelProperties @relationshipProperties { id: ID! callback1: String! @callback(operations: [CREATE], name: "callback4") @id } @@ -84,7 +84,7 @@ describe("schema/rfc/autogenerate-properties-rel", () => { genres: [Genre!]! @relationship(type: "IN_GENRE", direction: OUT, properties: "RelProperties") } - interface RelProperties { + interface RelProperties @relationshipProperties { id: ID! callback1: String! @callback(operations: [CREATE], name: "callback4") } @@ -111,7 +111,7 @@ describe("schema/rfc/autogenerate-properties-rel", () => { genres: [Genre!]! @relationship(type: "IN_GENRE", direction: OUT, properties: "RelProperties") } - interface RelProperties { + interface RelProperties @relationshipProperties { id: ID! callback1: String! @callback(operations: [CREATE], name: "callback1") callback2: String! @callback(operations: [UPDATE], name: "callback2") @@ -705,7 +705,7 @@ describe("schema/rfc/autogenerate-properties-rel", () => { genres: [Genre!]! @relationship(type: "IN_GENRE", direction: OUT, properties: "RelProperties") } - interface RelProperties { + interface RelProperties @relationshipProperties { id: ID! callback1: Int! @callback(operations: [CREATE], name: "callback1") callback2: Int! @callback(operations: [UPDATE], name: "callback2") diff --git a/packages/graphql/tests/schema/directives/alias.test.ts b/packages/graphql/tests/schema/directives/alias.test.ts index 623102239c..7e01b3f275 100644 --- a/packages/graphql/tests/schema/directives/alias.test.ts +++ b/packages/graphql/tests/schema/directives/alias.test.ts @@ -36,7 +36,7 @@ describe("Alias", () => { rating: Float @alias(property: "ratingPropInDb") } - interface ActorActedInProps { + interface ActorActedInProps @relationshipProperties { character: String! @alias(property: "characterPropInDb") screenTime: Int } diff --git a/packages/graphql/tests/schema/directives/populatedBy.test.ts b/packages/graphql/tests/schema/directives/populatedBy.test.ts index 4f986c3454..913fa1049d 100644 --- a/packages/graphql/tests/schema/directives/populatedBy.test.ts +++ b/packages/graphql/tests/schema/directives/populatedBy.test.ts @@ -486,7 +486,7 @@ describe("@populatedBy tests", () => { genres: [Genre!]! @relationship(type: "IN_GENRE", direction: OUT, properties: "RelProperties") } - interface RelProperties { + interface RelProperties @relationshipProperties { id: ID! callback1: String! @populatedBy(operations: [CREATE], callback: "callback4") @@ -514,7 +514,7 @@ describe("@populatedBy tests", () => { genres: [Genre!]! @relationship(type: "IN_GENRE", direction: OUT, properties: "RelProperties") } - interface RelProperties { + interface RelProperties @relationshipProperties { id: ID! callback1: String! @populatedBy(operations: [CREATE], callback: "callback4") @id } @@ -541,7 +541,7 @@ describe("@populatedBy tests", () => { genres: [Genre!]! @relationship(type: "IN_GENRE", direction: OUT, properties: "RelProperties") } - interface RelProperties { + interface RelProperties @relationshipProperties { id: ID! callback1: String! @populatedBy(operations: [CREATE], callback: "callback4") } @@ -570,7 +570,7 @@ describe("@populatedBy tests", () => { genres: [Genre!]! @relationship(type: "IN_GENRE", direction: OUT, properties: "RelProperties") } - interface RelProperties { + interface RelProperties @relationshipProperties { id: ID! callback1: String! @populatedBy(operations: [CREATE], callback: "callback1") callback2: String! @populatedBy(operations: [UPDATE], callback: "callback2") @@ -1164,7 +1164,7 @@ describe("@populatedBy tests", () => { genres: [Genre!]! @relationship(type: "IN_GENRE", direction: OUT, properties: "RelProperties") } - interface RelProperties { + interface RelProperties @relationshipProperties { id: ID! callback1: Int! @populatedBy(operations: [CREATE], callback: "callback1") callback2: Int! @populatedBy(operations: [UPDATE], callback: "callback2") diff --git a/packages/graphql/tests/schema/issues/1614.test.ts b/packages/graphql/tests/schema/issues/1614.test.ts index ad9d0f662a..5574e31fd8 100644 --- a/packages/graphql/tests/schema/issues/1614.test.ts +++ b/packages/graphql/tests/schema/issues/1614.test.ts @@ -30,7 +30,7 @@ describe("https://github.com/neo4j/graphql/issues/1614", () => { KeyGrip } - interface CrewPosition { + interface CrewPosition @relationshipProperties { position: CrewPositionType } diff --git a/packages/graphql/tests/schema/string-comparators.test.ts b/packages/graphql/tests/schema/string-comparators.test.ts index bf968e0bc0..938aae2c91 100644 --- a/packages/graphql/tests/schema/string-comparators.test.ts +++ b/packages/graphql/tests/schema/string-comparators.test.ts @@ -478,7 +478,7 @@ describe("String Comparators", () => { actors: [Actor!]! @relationship(type: "ACTED_IN", direction: IN, properties: "ActedIn") } - interface ActedIn { + interface ActedIn @relationshipProperties { screenTime: String } diff --git a/packages/graphql/tests/tck/aggregations/field-level-aggregations/field-level-aggregations-alias.test.ts b/packages/graphql/tests/tck/aggregations/field-level-aggregations/field-level-aggregations-alias.test.ts index e5ae806a82..ff961434a7 100644 --- a/packages/graphql/tests/tck/aggregations/field-level-aggregations/field-level-aggregations-alias.test.ts +++ b/packages/graphql/tests/tck/aggregations/field-level-aggregations/field-level-aggregations-alias.test.ts @@ -40,7 +40,7 @@ describe("Field Level Aggregations Alias", () => { movies: [Movie!]! @relationship(type: "ACTED_IN", direction: OUT, properties: "ActedIn") } - interface ActedIn { + interface ActedIn @relationshipProperties { time: Int @alias(property: "screentime") } `; diff --git a/packages/graphql/tests/tck/aggregations/field-level-aggregations/field-level-aggregations-edge.test.ts b/packages/graphql/tests/tck/aggregations/field-level-aggregations/field-level-aggregations-edge.test.ts index 1f1c68c08c..6b8d71c44f 100644 --- a/packages/graphql/tests/tck/aggregations/field-level-aggregations/field-level-aggregations-edge.test.ts +++ b/packages/graphql/tests/tck/aggregations/field-level-aggregations/field-level-aggregations-edge.test.ts @@ -40,7 +40,7 @@ describe("Field Level Aggregations", () => { movies: [Movie!]! @relationship(type: "ACTED_IN", direction: OUT, properties: "ActedIn") } - interface ActedIn { + interface ActedIn @relationshipProperties { screentime: Int } `; diff --git a/packages/graphql/tests/tck/aggregations/field-level-aggregations/field-level-aggregations-labels.test.ts b/packages/graphql/tests/tck/aggregations/field-level-aggregations/field-level-aggregations-labels.test.ts index cd646df3e3..6fd4471a82 100644 --- a/packages/graphql/tests/tck/aggregations/field-level-aggregations/field-level-aggregations-labels.test.ts +++ b/packages/graphql/tests/tck/aggregations/field-level-aggregations/field-level-aggregations-labels.test.ts @@ -40,7 +40,7 @@ describe("Field Level Aggregations Alias", () => { movies: [Movie!]! @relationship(type: "ACTED_IN", direction: OUT, properties: "ActedIn") } - interface ActedIn { + interface ActedIn @relationshipProperties { time: Int } `; diff --git a/packages/graphql/tests/tck/aggregations/where/edge/bigint.test.ts b/packages/graphql/tests/tck/aggregations/where/edge/bigint.test.ts index 8e219285ea..e2dc0da4a2 100644 --- a/packages/graphql/tests/tck/aggregations/where/edge/bigint.test.ts +++ b/packages/graphql/tests/tck/aggregations/where/edge/bigint.test.ts @@ -38,7 +38,7 @@ describe("Cypher Aggregations where edge with BigInt", () => { likes: [User!]! @relationship(type: "LIKES", direction: IN, properties: "Likes") } - interface Likes { + interface Likes @relationshipProperties { someBigInt: BigInt someBigIntAlias: BigInt @alias(property: "_someBigIntAlias") } diff --git a/packages/graphql/tests/tck/aggregations/where/edge/datetime.test.ts b/packages/graphql/tests/tck/aggregations/where/edge/datetime.test.ts index 600ba57bcb..f194a43035 100644 --- a/packages/graphql/tests/tck/aggregations/where/edge/datetime.test.ts +++ b/packages/graphql/tests/tck/aggregations/where/edge/datetime.test.ts @@ -38,7 +38,7 @@ describe("Cypher Aggregations where edge with DateTime", () => { likes: [User!]! @relationship(type: "LIKES", direction: IN, properties: "Likes") } - interface Likes { + interface Likes @relationshipProperties { someDateTime: DateTime someDateTimeAlias: DateTime @alias(property: "_someDateTimeAlias") } diff --git a/packages/graphql/tests/tck/aggregations/where/edge/duration.test.ts b/packages/graphql/tests/tck/aggregations/where/edge/duration.test.ts index 7f8a64a5aa..cc59a61692 100644 --- a/packages/graphql/tests/tck/aggregations/where/edge/duration.test.ts +++ b/packages/graphql/tests/tck/aggregations/where/edge/duration.test.ts @@ -38,7 +38,7 @@ describe("Cypher Aggregations where edge with Duration", () => { likes: [User!]! @relationship(type: "LIKES", direction: IN, properties: "Likes") } - interface Likes { + interface Likes @relationshipProperties { someDuration: Duration someDurationAlias: Duration @alias(property: "_someDurationAlias") } diff --git a/packages/graphql/tests/tck/aggregations/where/edge/float.test.ts b/packages/graphql/tests/tck/aggregations/where/edge/float.test.ts index 1ceb932647..284e26847c 100644 --- a/packages/graphql/tests/tck/aggregations/where/edge/float.test.ts +++ b/packages/graphql/tests/tck/aggregations/where/edge/float.test.ts @@ -38,7 +38,7 @@ describe("Cypher Aggregations where edge with Float", () => { likes: [User!]! @relationship(type: "LIKES", direction: IN, properties: "Likes") } - interface Likes { + interface Likes @relationshipProperties { someFloat: Float someFloatAlias: Float @alias(property: "_someFloatAlias") } diff --git a/packages/graphql/tests/tck/aggregations/where/edge/id.test.ts b/packages/graphql/tests/tck/aggregations/where/edge/id.test.ts index fa8ebcdda2..a5be12c45f 100644 --- a/packages/graphql/tests/tck/aggregations/where/edge/id.test.ts +++ b/packages/graphql/tests/tck/aggregations/where/edge/id.test.ts @@ -38,7 +38,7 @@ describe("Cypher Aggregations where edge with ID", () => { likes: [User!]! @relationship(type: "LIKES", direction: IN, properties: "Liked") } - interface Liked { + interface Liked @relationshipProperties { id: ID someIdAlias: ID @alias(property: "_someIdAlias") } diff --git a/packages/graphql/tests/tck/aggregations/where/edge/int.test.ts b/packages/graphql/tests/tck/aggregations/where/edge/int.test.ts index bccf59be0f..59c0ece4f2 100644 --- a/packages/graphql/tests/tck/aggregations/where/edge/int.test.ts +++ b/packages/graphql/tests/tck/aggregations/where/edge/int.test.ts @@ -38,7 +38,7 @@ describe("Cypher Aggregations where edge with Int", () => { likes: [User!]! @relationship(type: "LIKES", direction: IN, properties: "Liked") } - interface Liked { + interface Liked @relationshipProperties { someInt: Int someIntAlias: Int @alias(property: "_someIntAlias") } diff --git a/packages/graphql/tests/tck/aggregations/where/edge/localdatetime.test.ts b/packages/graphql/tests/tck/aggregations/where/edge/localdatetime.test.ts index a33bcac953..94d97d27fc 100644 --- a/packages/graphql/tests/tck/aggregations/where/edge/localdatetime.test.ts +++ b/packages/graphql/tests/tck/aggregations/where/edge/localdatetime.test.ts @@ -38,7 +38,7 @@ describe("Cypher Aggregations where edge with LocalDateTime", () => { likes: [User!]! @relationship(type: "LIKES", direction: IN, properties: "Likes") } - interface Likes { + interface Likes @relationshipProperties { someLocalDateTime: LocalDateTime someLocalDateTimeAlias: LocalDateTime @alias(property: "_someLocalDateTimeAlias") } diff --git a/packages/graphql/tests/tck/aggregations/where/edge/localtime.test.ts b/packages/graphql/tests/tck/aggregations/where/edge/localtime.test.ts index ed9ca6e711..d01d69fe3e 100644 --- a/packages/graphql/tests/tck/aggregations/where/edge/localtime.test.ts +++ b/packages/graphql/tests/tck/aggregations/where/edge/localtime.test.ts @@ -38,7 +38,7 @@ describe("Cypher Aggregations where edge with LocalTime", () => { likes: [User!]! @relationship(type: "LIKES", direction: IN, properties: "Likes") } - interface Likes { + interface Likes @relationshipProperties { someLocalTime: LocalTime someLocalTimeAlias: LocalTime @alias(property: "_someLocalTimeAlias") } diff --git a/packages/graphql/tests/tck/aggregations/where/edge/logical.test.ts b/packages/graphql/tests/tck/aggregations/where/edge/logical.test.ts index 68aa6d9bac..2d7fc0301c 100644 --- a/packages/graphql/tests/tck/aggregations/where/edge/logical.test.ts +++ b/packages/graphql/tests/tck/aggregations/where/edge/logical.test.ts @@ -38,7 +38,7 @@ describe("Cypher Aggregations where edge with Logical AND + OR + NOT", () => { likes: [User!]! @relationship(type: "LIKES", direction: IN, properties: "Likes") } - interface Likes { + interface Likes @relationshipProperties { someFloat: Float } `; diff --git a/packages/graphql/tests/tck/aggregations/where/edge/string.test.ts b/packages/graphql/tests/tck/aggregations/where/edge/string.test.ts index b3b484ec04..affb7e4bc0 100644 --- a/packages/graphql/tests/tck/aggregations/where/edge/string.test.ts +++ b/packages/graphql/tests/tck/aggregations/where/edge/string.test.ts @@ -38,7 +38,7 @@ describe("Cypher Aggregations where edge with String", () => { likes: [User!]! @relationship(type: "LIKES", direction: IN, properties: "Likes") } - interface Likes { + interface Likes @relationshipProperties { someString: String someStringAlias: String @alias(property: "_someStringAlias") } diff --git a/packages/graphql/tests/tck/aggregations/where/edge/time.test.ts b/packages/graphql/tests/tck/aggregations/where/edge/time.test.ts index af1d1b06bc..0e931e13f0 100644 --- a/packages/graphql/tests/tck/aggregations/where/edge/time.test.ts +++ b/packages/graphql/tests/tck/aggregations/where/edge/time.test.ts @@ -38,7 +38,7 @@ describe("Cypher Aggregations where edge with Time", () => { likes: [User!]! @relationship(type: "LIKES", direction: IN, properties: "Likes") } - interface Likes { + interface Likes @relationshipProperties { someTime: Time someTimeAlias: Time @alias(property: "_someTimeAlias") } diff --git a/packages/graphql/tests/tck/connections/alias.test.ts b/packages/graphql/tests/tck/connections/alias.test.ts index e62e5b760d..cab2adaaec 100644 --- a/packages/graphql/tests/tck/connections/alias.test.ts +++ b/packages/graphql/tests/tck/connections/alias.test.ts @@ -39,7 +39,7 @@ describe("Connections Alias", () => { movies: [Movie!]! @relationship(type: "ACTED_IN", properties: "ActedIn", direction: OUT) } - interface ActedIn { + interface ActedIn @relationshipProperties { screenTime: Int! } `; diff --git a/packages/graphql/tests/tck/connections/connect-or-create/connect-or-create.test.ts b/packages/graphql/tests/tck/connections/connect-or-create/connect-or-create.test.ts index 1224a4fc66..fb0c4f2c41 100644 --- a/packages/graphql/tests/tck/connections/connect-or-create/connect-or-create.test.ts +++ b/packages/graphql/tests/tck/connections/connect-or-create/connect-or-create.test.ts @@ -42,7 +42,7 @@ describe("Create or Connect", () => { movies: [Movie!]! @relationship(type: "ACTED_IN", properties: "ActedIn", direction: OUT) } - interface ActedIn { + interface ActedIn @relationshipProperties { screentime: Int! } `; @@ -200,7 +200,7 @@ describe("Create or Connect", () => { movies: [Movie!]! @relationship(type: "ACTED_IN", properties: "ActedIn", direction: OUT) } - interface ActedIn { + interface ActedIn @relationshipProperties { screentime: Int! } `; @@ -484,7 +484,7 @@ describe("Create or Connect", () => { movies: [Movie!]! @relationship(type: "ACTED_IN", properties: "ActedIn", direction: OUT) } - interface ActedIn { + interface ActedIn @relationshipProperties { id: ID! @id createdAt: DateTime! @timestamp(operations: [CREATE]) updatedAt: DateTime! @timestamp(operations: [UPDATE]) diff --git a/packages/graphql/tests/tck/connections/filtering/composite.test.ts b/packages/graphql/tests/tck/connections/filtering/composite.test.ts index 60a30ee352..1f8261258e 100644 --- a/packages/graphql/tests/tck/connections/filtering/composite.test.ts +++ b/packages/graphql/tests/tck/connections/filtering/composite.test.ts @@ -42,7 +42,7 @@ describe("Cypher -> Connections -> Filtering -> Composite", () => { movies: [Movie!]! @relationship(type: "ACTED_IN", properties: "ActedIn", direction: OUT) } - interface ActedIn { + interface ActedIn @relationshipProperties { screenTime: Int! } `; diff --git a/packages/graphql/tests/tck/connections/filtering/node/and.test.ts b/packages/graphql/tests/tck/connections/filtering/node/and.test.ts index bb90a4540a..ef3c36acfc 100644 --- a/packages/graphql/tests/tck/connections/filtering/node/and.test.ts +++ b/packages/graphql/tests/tck/connections/filtering/node/and.test.ts @@ -42,7 +42,7 @@ describe("Cypher -> Connections -> Filtering -> Node -> AND", () => { movies: [Movie!]! @relationship(type: "ACTED_IN", properties: "ActedIn", direction: OUT) } - interface ActedIn { + interface ActedIn @relationshipProperties { screenTime: Int! } `; diff --git a/packages/graphql/tests/tck/connections/filtering/node/arrays.test.ts b/packages/graphql/tests/tck/connections/filtering/node/arrays.test.ts index afa49b5baf..e198936e4a 100644 --- a/packages/graphql/tests/tck/connections/filtering/node/arrays.test.ts +++ b/packages/graphql/tests/tck/connections/filtering/node/arrays.test.ts @@ -42,7 +42,7 @@ describe("Cypher -> Connections -> Filtering -> Node -> Arrays", () => { movies: [Movie!]! @relationship(type: "ACTED_IN", properties: "ActedIn", direction: OUT) } - interface ActedIn { + interface ActedIn @relationshipProperties { screenTime: Int! } `; diff --git a/packages/graphql/tests/tck/connections/filtering/node/equality.test.ts b/packages/graphql/tests/tck/connections/filtering/node/equality.test.ts index dafd82e742..820fac19b9 100644 --- a/packages/graphql/tests/tck/connections/filtering/node/equality.test.ts +++ b/packages/graphql/tests/tck/connections/filtering/node/equality.test.ts @@ -41,7 +41,7 @@ describe("Cypher -> Connections -> Filtering -> Node -> Equality", () => { movies: [Movie!]! @relationship(type: "ACTED_IN", properties: "ActedIn", direction: OUT) } - interface ActedIn { + interface ActedIn @relationshipProperties { screenTime: Int! } `; diff --git a/packages/graphql/tests/tck/connections/filtering/node/numerical.test.ts b/packages/graphql/tests/tck/connections/filtering/node/numerical.test.ts index d6b299334d..63a9737fef 100644 --- a/packages/graphql/tests/tck/connections/filtering/node/numerical.test.ts +++ b/packages/graphql/tests/tck/connections/filtering/node/numerical.test.ts @@ -42,7 +42,7 @@ describe("Cypher -> Connections -> Filtering -> Node -> Numerical", () => { movies: [Movie!]! @relationship(type: "ACTED_IN", properties: "ActedIn", direction: OUT) } - interface ActedIn { + interface ActedIn @relationshipProperties { screenTime: Int! } `; diff --git a/packages/graphql/tests/tck/connections/filtering/node/or.test.ts b/packages/graphql/tests/tck/connections/filtering/node/or.test.ts index 9568428ce9..160d1fe381 100644 --- a/packages/graphql/tests/tck/connections/filtering/node/or.test.ts +++ b/packages/graphql/tests/tck/connections/filtering/node/or.test.ts @@ -42,7 +42,7 @@ describe("Cypher -> Connections -> Filtering -> Node -> OR", () => { movies: [Movie!]! @relationship(type: "ACTED_IN", properties: "ActedIn", direction: OUT) } - interface ActedIn { + interface ActedIn @relationshipProperties { screenTime: Int! } `; diff --git a/packages/graphql/tests/tck/connections/filtering/node/points.test.ts b/packages/graphql/tests/tck/connections/filtering/node/points.test.ts index d1d7c1ae7b..65cbf2ef39 100644 --- a/packages/graphql/tests/tck/connections/filtering/node/points.test.ts +++ b/packages/graphql/tests/tck/connections/filtering/node/points.test.ts @@ -42,7 +42,7 @@ describe("Cypher -> Connections -> Filtering -> Node -> Points", () => { movies: [Movie!]! @relationship(type: "ACTED_IN", properties: "ActedIn", direction: OUT) } - interface ActedIn { + interface ActedIn @relationshipProperties { screenTime: Int! } `; diff --git a/packages/graphql/tests/tck/connections/filtering/node/string.test.ts b/packages/graphql/tests/tck/connections/filtering/node/string.test.ts index dca1ef1f58..a78cce320f 100644 --- a/packages/graphql/tests/tck/connections/filtering/node/string.test.ts +++ b/packages/graphql/tests/tck/connections/filtering/node/string.test.ts @@ -47,7 +47,7 @@ describe("Cypher -> Connections -> Filtering -> Node -> String", () => { movies: [Movie!]! @relationship(type: "ACTED_IN", properties: "ActedIn", direction: OUT) } - interface ActedIn { + interface ActedIn @relationshipProperties { screenTime: Int! } `; diff --git a/packages/graphql/tests/tck/connections/filtering/relationship/and.test.ts b/packages/graphql/tests/tck/connections/filtering/relationship/and.test.ts index d3427d1e27..c9bfd94d2f 100644 --- a/packages/graphql/tests/tck/connections/filtering/relationship/and.test.ts +++ b/packages/graphql/tests/tck/connections/filtering/relationship/and.test.ts @@ -41,7 +41,7 @@ describe("Cypher -> Connections -> Filtering -> Relationship -> AND", () => { movies: [Movie!]! @relationship(type: "ACTED_IN", properties: "ActedIn", direction: OUT) } - interface ActedIn { + interface ActedIn @relationshipProperties { role: String! screenTime: Int! } diff --git a/packages/graphql/tests/tck/connections/filtering/relationship/arrays.test.ts b/packages/graphql/tests/tck/connections/filtering/relationship/arrays.test.ts index 743185982d..19c98811f8 100644 --- a/packages/graphql/tests/tck/connections/filtering/relationship/arrays.test.ts +++ b/packages/graphql/tests/tck/connections/filtering/relationship/arrays.test.ts @@ -41,7 +41,7 @@ describe("Cypher -> Connections -> Filtering -> Relationship -> Arrays", () => { movies: [Movie!]! @relationship(type: "ACTED_IN", properties: "ActedIn", direction: OUT) } - interface ActedIn { + interface ActedIn @relationshipProperties { screenTime: Int! quotes: [String!] } diff --git a/packages/graphql/tests/tck/connections/filtering/relationship/equality.test.ts b/packages/graphql/tests/tck/connections/filtering/relationship/equality.test.ts index 195450b975..6c1529d0b1 100644 --- a/packages/graphql/tests/tck/connections/filtering/relationship/equality.test.ts +++ b/packages/graphql/tests/tck/connections/filtering/relationship/equality.test.ts @@ -41,7 +41,7 @@ describe("Cypher -> Connections -> Filtering -> Relationship -> Equality", () => movies: [Movie!]! @relationship(type: "ACTED_IN", properties: "ActedIn", direction: OUT) } - interface ActedIn { + interface ActedIn @relationshipProperties { screenTime: Int! } `; diff --git a/packages/graphql/tests/tck/connections/filtering/relationship/numerical.test.ts b/packages/graphql/tests/tck/connections/filtering/relationship/numerical.test.ts index d77c40d3e2..6f96f6c06d 100644 --- a/packages/graphql/tests/tck/connections/filtering/relationship/numerical.test.ts +++ b/packages/graphql/tests/tck/connections/filtering/relationship/numerical.test.ts @@ -41,7 +41,7 @@ describe("Cypher -> Connections -> Filtering -> Relationship -> Numerical", () = movies: [Movie!]! @relationship(type: "ACTED_IN", properties: "ActedIn", direction: OUT) } - interface ActedIn { + interface ActedIn @relationshipProperties { screenTime: Int! } `; diff --git a/packages/graphql/tests/tck/connections/filtering/relationship/or.test.ts b/packages/graphql/tests/tck/connections/filtering/relationship/or.test.ts index 63505aa576..af37056e5e 100644 --- a/packages/graphql/tests/tck/connections/filtering/relationship/or.test.ts +++ b/packages/graphql/tests/tck/connections/filtering/relationship/or.test.ts @@ -41,7 +41,7 @@ describe("Cypher -> Connections -> Filtering -> Relationship -> OR", () => { movies: [Movie!]! @relationship(type: "ACTED_IN", properties: "ActedIn", direction: OUT) } - interface ActedIn { + interface ActedIn @relationshipProperties { role: String! screenTime: Int! } diff --git a/packages/graphql/tests/tck/connections/filtering/relationship/points.test.ts b/packages/graphql/tests/tck/connections/filtering/relationship/points.test.ts index e52bd3c517..f437c19f46 100644 --- a/packages/graphql/tests/tck/connections/filtering/relationship/points.test.ts +++ b/packages/graphql/tests/tck/connections/filtering/relationship/points.test.ts @@ -41,7 +41,7 @@ describe("Cypher -> Connections -> Filtering -> Relationship -> Points", () => { movies: [Movie!]! @relationship(type: "ACTED_IN", properties: "ActedIn", direction: OUT) } - interface ActedIn { + interface ActedIn @relationshipProperties { screenTime: Int! location: Point! } diff --git a/packages/graphql/tests/tck/connections/filtering/relationship/string.test.ts b/packages/graphql/tests/tck/connections/filtering/relationship/string.test.ts index 68fc2dfc5a..6dae2c8fd7 100644 --- a/packages/graphql/tests/tck/connections/filtering/relationship/string.test.ts +++ b/packages/graphql/tests/tck/connections/filtering/relationship/string.test.ts @@ -47,7 +47,7 @@ describe("Cypher -> Connections -> Filtering -> Relationship -> String", () => { movies: [Movie!]! @relationship(type: "ACTED_IN", properties: "ActedIn", direction: OUT) } - interface ActedIn { + interface ActedIn @relationshipProperties { role: String! screenTime: Int! } diff --git a/packages/graphql/tests/tck/connections/filtering/relationship/temporal.test.ts b/packages/graphql/tests/tck/connections/filtering/relationship/temporal.test.ts index 55e7bd83ca..f11434e1e7 100644 --- a/packages/graphql/tests/tck/connections/filtering/relationship/temporal.test.ts +++ b/packages/graphql/tests/tck/connections/filtering/relationship/temporal.test.ts @@ -41,7 +41,7 @@ describe("Cypher -> Connections -> Filtering -> Relationship -> Temporal", () => movies: [Movie!]! @relationship(type: "ACTED_IN", properties: "ActedIn", direction: OUT) } - interface ActedIn { + interface ActedIn @relationshipProperties { startDate: Date endDateTime: DateTime } diff --git a/packages/graphql/tests/tck/connections/mixed-nesting.test.ts b/packages/graphql/tests/tck/connections/mixed-nesting.test.ts index 36ed3c48db..508ec29ad8 100644 --- a/packages/graphql/tests/tck/connections/mixed-nesting.test.ts +++ b/packages/graphql/tests/tck/connections/mixed-nesting.test.ts @@ -39,7 +39,7 @@ describe("Mixed nesting", () => { movies: [Movie!]! @relationship(type: "ACTED_IN", properties: "ActedIn", direction: OUT) } - interface ActedIn { + interface ActedIn @relationshipProperties { screenTime: Int! } `; diff --git a/packages/graphql/tests/tck/connections/projections/create.test.ts b/packages/graphql/tests/tck/connections/projections/create.test.ts index 167e6fee5f..ac1efaa9e4 100644 --- a/packages/graphql/tests/tck/connections/projections/create.test.ts +++ b/packages/graphql/tests/tck/connections/projections/create.test.ts @@ -41,7 +41,7 @@ describe("Cypher -> Connections -> Projections -> Create", () => { movies: [Movie!]! @relationship(type: "ACTED_IN", properties: "ActedIn", direction: OUT) } - interface ActedIn { + interface ActedIn @relationshipProperties { screenTime: Int! } `; diff --git a/packages/graphql/tests/tck/connections/projections/update.test.ts b/packages/graphql/tests/tck/connections/projections/update.test.ts index 316790ba8f..35cb1af91c 100644 --- a/packages/graphql/tests/tck/connections/projections/update.test.ts +++ b/packages/graphql/tests/tck/connections/projections/update.test.ts @@ -41,7 +41,7 @@ describe("Cypher -> Connections -> Projections -> Update", () => { movies: [Movie!]! @relationship(type: "ACTED_IN", properties: "ActedIn", direction: OUT) } - interface ActedIn { + interface ActedIn @relationshipProperties { screenTime: Int! } `; diff --git a/packages/graphql/tests/tck/connections/relationship-properties.test.ts b/packages/graphql/tests/tck/connections/relationship-properties.test.ts index f281cd8089..381b65cc95 100644 --- a/packages/graphql/tests/tck/connections/relationship-properties.test.ts +++ b/packages/graphql/tests/tck/connections/relationship-properties.test.ts @@ -39,7 +39,7 @@ describe("Relationship Properties Cypher", () => { movies: [Movie!]! @relationship(type: "ACTED_IN", properties: "ActedIn", direction: OUT) } - interface ActedIn { + interface ActedIn @relationshipProperties { screenTime: Int! year: Int! } diff --git a/packages/graphql/tests/tck/connections/relationship_properties/connect.test.ts b/packages/graphql/tests/tck/connections/relationship_properties/connect.test.ts index c142be3992..827bccba33 100644 --- a/packages/graphql/tests/tck/connections/relationship_properties/connect.test.ts +++ b/packages/graphql/tests/tck/connections/relationship_properties/connect.test.ts @@ -41,7 +41,7 @@ describe("Relationship Properties Connect Cypher", () => { movies: [Movie!]! @relationship(type: "ACTED_IN", properties: "ActedIn", direction: OUT) } - interface ActedIn { + interface ActedIn @relationshipProperties { screenTime: Int! } `; diff --git a/packages/graphql/tests/tck/connections/relationship_properties/create.test.ts b/packages/graphql/tests/tck/connections/relationship_properties/create.test.ts index 85acd85ba2..e7321a6051 100644 --- a/packages/graphql/tests/tck/connections/relationship_properties/create.test.ts +++ b/packages/graphql/tests/tck/connections/relationship_properties/create.test.ts @@ -41,7 +41,7 @@ describe("Relationship Properties Create Cypher", () => { movies: [Movie!]! @relationship(type: "ACTED_IN", properties: "ActedIn", direction: OUT) } - interface ActedIn { + interface ActedIn @relationshipProperties { screenTime: Int! } `; diff --git a/packages/graphql/tests/tck/connections/relationship_properties/update.test.ts b/packages/graphql/tests/tck/connections/relationship_properties/update.test.ts index 0441129cfb..3ccc1b78ae 100644 --- a/packages/graphql/tests/tck/connections/relationship_properties/update.test.ts +++ b/packages/graphql/tests/tck/connections/relationship_properties/update.test.ts @@ -39,7 +39,7 @@ describe("Cypher -> Connections -> Relationship Properties -> Update", () => { movies: [Movie!]! @relationship(type: "ACTED_IN", properties: "ActedIn", direction: OUT) } - interface ActedIn { + interface ActedIn @relationshipProperties { screenTime: Int! } `; diff --git a/packages/graphql/tests/tck/connections/unions.test.ts b/packages/graphql/tests/tck/connections/unions.test.ts index 9e6f76e1f7..cdc2e95c0c 100644 --- a/packages/graphql/tests/tck/connections/unions.test.ts +++ b/packages/graphql/tests/tck/connections/unions.test.ts @@ -46,7 +46,7 @@ describe("Cypher -> Connections -> Unions", () => { author: [Author!]! @relationship(type: "WROTE", direction: IN, properties: "Wrote") } - interface Wrote { + interface Wrote @relationshipProperties { words: Int! } `; diff --git a/packages/graphql/tests/tck/directives/alias.test.ts b/packages/graphql/tests/tck/directives/alias.test.ts index c76a9e5b4a..df26b36382 100644 --- a/packages/graphql/tests/tck/directives/alias.test.ts +++ b/packages/graphql/tests/tck/directives/alias.test.ts @@ -40,7 +40,7 @@ describe("Cypher alias directive", () => { rating: Float @alias(property: "ratingPropInDb") } - interface ActorActedInProps { + interface ActorActedInProps @relationshipProperties { character: String! @alias(property: "characterPropInDb") screenTime: Int } diff --git a/packages/graphql/tests/tck/directives/customResolver.test.ts b/packages/graphql/tests/tck/directives/customResolver.test.ts index 0d88e51895..67dc8e244e 100644 --- a/packages/graphql/tests/tck/directives/customResolver.test.ts +++ b/packages/graphql/tests/tck/directives/customResolver.test.ts @@ -273,17 +273,17 @@ describe("@customResolver directive", () => { "MATCH (this:\`User\`) CALL { WITH this - MATCH (this)-[this0:LIVES_AT]->(this_address:\`Address\`) + MATCH (this)-[this0:LIVES_AT]->(this1:\`Address\`) CALL { - WITH this_address - MATCH (this_address)-[this1:IN_CITY]->(this_address_city:\`City\`) - WITH this_address_city { .name, .population } AS this_address_city - RETURN head(collect(this_address_city)) AS this_address_city + WITH this1 + MATCH (this1)-[this2:IN_CITY]->(this3:\`City\`) + WITH this3 { .name, .population } AS this3 + RETURN head(collect(this3)) AS var4 } - WITH this_address { city: this_address_city } AS this_address - RETURN head(collect(this_address)) AS this_address + WITH this1 { city: var4 } AS this1 + RETURN head(collect(this1)) AS var5 } - RETURN this { .firstName, .lastName, .fullName, address: this_address } AS this" + RETURN this { .firstName, .lastName, .fullName, address: var5 } AS this" `); expect(formatParams(result.params)).toMatchInlineSnapshot(`"{}"`); @@ -335,17 +335,17 @@ describe("@customResolver directive", () => { "MATCH (this:\`User\`) CALL { WITH this - MATCH (this)-[this0:LIVES_AT]->(this_address:\`Address\`) + MATCH (this)-[this0:LIVES_AT]->(this1:\`Address\`) CALL { - WITH this_address - MATCH (this_address)-[this1:IN_CITY]->(this_address_city:\`City\`) - WITH this_address_city { .population, .name } AS this_address_city - RETURN head(collect(this_address_city)) AS this_address_city + WITH this1 + MATCH (this1)-[this2:IN_CITY]->(this3:\`City\`) + WITH this3 { .population, .name } AS this3 + RETURN head(collect(this3)) AS var4 } - WITH this_address { city: this_address_city } AS this_address - RETURN head(collect(this_address)) AS this_address + WITH this1 { city: var4 } AS this1 + RETURN head(collect(this1)) AS var5 } - RETURN this { .lastName, .fullName, address: this_address, .firstName } AS this" + RETURN this { .lastName, .fullName, address: var5, .firstName } AS this" `); expect(formatParams(result.params)).toMatchInlineSnapshot(`"{}"`); @@ -369,17 +369,17 @@ describe("@customResolver directive", () => { "MATCH (this:\`User\`) CALL { WITH this - MATCH (this)-[this0:LIVES_AT]->(this_address:\`Address\`) + MATCH (this)-[this0:LIVES_AT]->(this1:\`Address\`) CALL { - WITH this_address - MATCH (this_address)-[this1:IN_CITY]->(this_address_city:\`City\`) - WITH this_address_city { .name, .population } AS this_address_city - RETURN head(collect(this_address_city)) AS this_address_city + WITH this1 + MATCH (this1)-[this2:IN_CITY]->(this3:\`City\`) + WITH this3 { .name, .population } AS this3 + RETURN head(collect(this3)) AS var4 } - WITH this_address { city: this_address_city } AS this_address - RETURN head(collect(this_address)) AS this_address + WITH this1 { city: var4 } AS this1 + RETURN head(collect(this1)) AS var5 } - RETURN this { .fullName, .firstName, .lastName, address: this_address } AS this" + RETURN this { .fullName, .firstName, .lastName, address: var5 } AS this" `); expect(formatParams(result.params)).toMatchInlineSnapshot(`"{}"`); @@ -453,19 +453,19 @@ describe("@customResolver directive", () => { WITH this CALL { WITH * - MATCH (this)-[this0:WROTE]->(this_publications:\`Book\`) - WITH this_publications { __resolveType: \\"Book\\", __id: id(this), .title } AS this_publications - RETURN this_publications AS this_publications + MATCH (this)-[this0:WROTE]->(this1:\`Book\`) + WITH this1 { __resolveType: \\"Book\\", __id: id(this), .title } AS this1 + RETURN this1 AS var2 UNION WITH * - MATCH (this)-[this1:WROTE]->(this_publications:\`Journal\`) - WITH this_publications { __resolveType: \\"Journal\\", __id: id(this), .subject } AS this_publications - RETURN this_publications AS this_publications + MATCH (this)-[this3:WROTE]->(this4:\`Journal\`) + WITH this4 { __resolveType: \\"Journal\\", __id: id(this), .subject } AS this4 + RETURN this4 AS var2 } - WITH this_publications - RETURN collect(this_publications) AS this_publications + WITH var2 + RETURN collect(var2) AS var2 } - RETURN this { .name, .publicationsWithAuthor, publications: this_publications } AS this" + RETURN this { .name, .publicationsWithAuthor, publications: var2 } AS this" `); expect(formatParams(result.params)).toMatchInlineSnapshot(`"{}"`); @@ -518,19 +518,19 @@ describe("@customResolver directive", () => { WITH this CALL { WITH * - MATCH (this)-[this0:WROTE]->(this_publications:\`Book\`) - WITH this_publications { __resolveType: \\"Book\\", __id: id(this), .title } AS this_publications - RETURN this_publications AS this_publications + MATCH (this)-[this0:WROTE]->(this1:\`Book\`) + WITH this1 { __resolveType: \\"Book\\", __id: id(this), .title } AS this1 + RETURN this1 AS var2 UNION WITH * - MATCH (this)-[this1:WROTE]->(this_publications:\`Journal\`) - WITH this_publications { __resolveType: \\"Journal\\", __id: id(this), .subject } AS this_publications - RETURN this_publications AS this_publications + MATCH (this)-[this3:WROTE]->(this4:\`Journal\`) + WITH this4 { __resolveType: \\"Journal\\", __id: id(this), .subject } AS this4 + RETURN this4 AS var2 } - WITH this_publications - RETURN collect(this_publications) AS this_publications + WITH var2 + RETURN collect(var2) AS var2 } - RETURN this { .publicationsWithAuthor, publications: this_publications, .name } AS this" + RETURN this { .publicationsWithAuthor, publications: var2, .name } AS this" `); expect(formatParams(result.params)).toMatchInlineSnapshot(`"{}"`); @@ -556,19 +556,19 @@ describe("@customResolver directive", () => { WITH this CALL { WITH * - MATCH (this)-[this0:WROTE]->(this_publications:\`Book\`) - WITH this_publications { __resolveType: \\"Book\\", __id: id(this), .title } AS this_publications - RETURN this_publications AS this_publications + MATCH (this)-[this0:WROTE]->(this1:\`Book\`) + WITH this1 { __resolveType: \\"Book\\", __id: id(this), .title } AS this1 + RETURN this1 AS var2 UNION WITH * - MATCH (this)-[this1:WROTE]->(this_publications:\`Journal\`) - WITH this_publications { __resolveType: \\"Journal\\", __id: id(this), .subject } AS this_publications - RETURN this_publications AS this_publications + MATCH (this)-[this3:WROTE]->(this4:\`Journal\`) + WITH this4 { __resolveType: \\"Journal\\", __id: id(this), .subject } AS this4 + RETURN this4 AS var2 } - WITH this_publications - RETURN collect(this_publications) AS this_publications + WITH var2 + RETURN collect(var2) AS var2 } - RETURN this { .publicationsWithAuthor, .name, publications: this_publications } AS this" + RETURN this { .publicationsWithAuthor, .name, publications: var2 } AS this" `); expect(formatParams(result.params)).toMatchInlineSnapshot(`"{}"`); @@ -647,19 +647,19 @@ describe("@customResolver directive", () => { WITH this CALL { WITH * - MATCH (this)-[this0:WROTE]->(this_publications:\`Book\`) - WITH this_publications { __resolveType: \\"Book\\", __id: id(this), .title, .publicationYear } AS this_publications - RETURN this_publications AS this_publications + MATCH (this)-[this0:WROTE]->(this1:\`Book\`) + WITH this1 { __resolveType: \\"Book\\", __id: id(this), .title, .publicationYear } AS this1 + RETURN this1 AS var2 UNION WITH * - MATCH (this)-[this1:WROTE]->(this_publications:\`Journal\`) - WITH this_publications { __resolveType: \\"Journal\\", __id: id(this), .subject, .publicationYear } AS this_publications - RETURN this_publications AS this_publications + MATCH (this)-[this3:WROTE]->(this4:\`Journal\`) + WITH this4 { __resolveType: \\"Journal\\", __id: id(this), .subject, .publicationYear } AS this4 + RETURN this4 AS var2 } - WITH this_publications - RETURN collect(this_publications) AS this_publications + WITH var2 + RETURN collect(var2) AS var2 } - RETURN this { .name, .publicationsWithAuthor, publications: this_publications } AS this" + RETURN this { .name, .publicationsWithAuthor, publications: var2 } AS this" `); expect(formatParams(result.params)).toMatchInlineSnapshot(`"{}"`); @@ -712,19 +712,19 @@ describe("@customResolver directive", () => { WITH this CALL { WITH * - MATCH (this)-[this0:WROTE]->(this_publications:\`Book\`) - WITH this_publications { __resolveType: \\"Book\\", __id: id(this), .title, .publicationYear } AS this_publications - RETURN this_publications AS this_publications + MATCH (this)-[this0:WROTE]->(this1:\`Book\`) + WITH this1 { __resolveType: \\"Book\\", __id: id(this), .title, .publicationYear } AS this1 + RETURN this1 AS var2 UNION WITH * - MATCH (this)-[this1:WROTE]->(this_publications:\`Journal\`) - WITH this_publications { __resolveType: \\"Journal\\", __id: id(this), .subject, .publicationYear } AS this_publications - RETURN this_publications AS this_publications + MATCH (this)-[this3:WROTE]->(this4:\`Journal\`) + WITH this4 { __resolveType: \\"Journal\\", __id: id(this), .subject, .publicationYear } AS this4 + RETURN this4 AS var2 } - WITH this_publications - RETURN collect(this_publications) AS this_publications + WITH var2 + RETURN collect(var2) AS var2 } - RETURN this { .publicationsWithAuthor, publications: this_publications, .name } AS this" + RETURN this { .publicationsWithAuthor, publications: var2, .name } AS this" `); expect(formatParams(result.params)).toMatchInlineSnapshot(`"{}"`); @@ -750,19 +750,19 @@ describe("@customResolver directive", () => { WITH this CALL { WITH * - MATCH (this)-[this0:WROTE]->(this_publications:\`Book\`) - WITH this_publications { __resolveType: \\"Book\\", __id: id(this), .title, .publicationYear } AS this_publications - RETURN this_publications AS this_publications + MATCH (this)-[this0:WROTE]->(this1:\`Book\`) + WITH this1 { __resolveType: \\"Book\\", __id: id(this), .title, .publicationYear } AS this1 + RETURN this1 AS var2 UNION WITH * - MATCH (this)-[this1:WROTE]->(this_publications:\`Journal\`) - WITH this_publications { __resolveType: \\"Journal\\", __id: id(this), .subject, .publicationYear } AS this_publications - RETURN this_publications AS this_publications + MATCH (this)-[this3:WROTE]->(this4:\`Journal\`) + WITH this4 { __resolveType: \\"Journal\\", __id: id(this), .subject, .publicationYear } AS this4 + RETURN this4 AS var2 } - WITH this_publications - RETURN collect(this_publications) AS this_publications + WITH var2 + RETURN collect(var2) AS var2 } - RETURN this { .publicationsWithAuthor, .name, publications: this_publications } AS this" + RETURN this { .publicationsWithAuthor, .name, publications: var2 } AS this" `); expect(formatParams(result.params)).toMatchInlineSnapshot(`"{}"`); diff --git a/packages/graphql/tests/tck/issues/1150.test.ts b/packages/graphql/tests/tck/issues/1150.test.ts index dc10cdf2a7..07dbfa5b6c 100644 --- a/packages/graphql/tests/tck/issues/1150.test.ts +++ b/packages/graphql/tests/tck/issues/1150.test.ts @@ -56,7 +56,7 @@ describe("https://github.com/neo4j/graphql/issues/1150", () => { @relationship(type: "HAS", properties: "RelationProps", direction: OUT) } - interface RelationProps { + interface RelationProps @relationshipProperties { current: Boolean! } `; diff --git a/packages/graphql/tests/tck/issues/1221.test.ts b/packages/graphql/tests/tck/issues/1221.test.ts index bd70c7c15f..df4e5331d6 100644 --- a/packages/graphql/tests/tck/issues/1221.test.ts +++ b/packages/graphql/tests/tck/issues/1221.test.ts @@ -39,7 +39,7 @@ describe("https://github.com/neo4j/graphql/issues/1221", () => { fullName: String! } - interface RelationProps { + interface RelationProps @relationshipProperties { current: Boolean! } @@ -137,7 +137,7 @@ describe("https://github.com/neo4j/graphql/issues/1221", () => { fullName: String! } - interface RelationProps { + interface RelationProps @relationshipProperties { current: Boolean! } diff --git a/packages/graphql/tests/tck/issues/1783.test.ts b/packages/graphql/tests/tck/issues/1783.test.ts index 849443ab99..3f4b6f7e02 100644 --- a/packages/graphql/tests/tck/issues/1783.test.ts +++ b/packages/graphql/tests/tck/issues/1783.test.ts @@ -40,7 +40,7 @@ describe("https://github.com/neo4j/graphql/issues/1783", () => { fullName: String! } - interface RelationProps { + interface RelationProps @relationshipProperties { current: Boolean! } diff --git a/packages/graphql/tests/tck/issues/2670.test.ts b/packages/graphql/tests/tck/issues/2670.test.ts index 13c8c4b610..7d36995c10 100644 --- a/packages/graphql/tests/tck/issues/2670.test.ts +++ b/packages/graphql/tests/tck/issues/2670.test.ts @@ -41,7 +41,7 @@ describe("https://github.com/neo4j/graphql/issues/2670", () => { genres: [Genre!]! @relationship(type: "IN_GENRE", direction: OUT, properties: "InGenre") } - interface InGenre { + interface InGenre @relationshipProperties { intValue: Int! } `; diff --git a/packages/graphql/tests/tck/issues/2708.test.ts b/packages/graphql/tests/tck/issues/2708.test.ts index 048ddfbb57..28fadf8669 100644 --- a/packages/graphql/tests/tck/issues/2708.test.ts +++ b/packages/graphql/tests/tck/issues/2708.test.ts @@ -41,7 +41,7 @@ describe("https://github.com/neo4j/graphql/issues/2708", () => { genres: [Genre!]! @relationship(type: "IN_GENRE", direction: OUT, properties: "InGenre") } - interface InGenre { + interface InGenre @relationshipProperties { intValue: Int! } `; diff --git a/packages/graphql/tests/tck/issues/2713.test.ts b/packages/graphql/tests/tck/issues/2713.test.ts index e8e850fc52..bee0da12f6 100644 --- a/packages/graphql/tests/tck/issues/2713.test.ts +++ b/packages/graphql/tests/tck/issues/2713.test.ts @@ -41,7 +41,7 @@ describe("https://github.com/neo4j/graphql/issues/2713", () => { genres: [Genre!]! @relationship(type: "IN_GENRE", direction: OUT, properties: "InGenre") } - interface InGenre { + interface InGenre @relationshipProperties { intValue: Int! } `; diff --git a/packages/graphql/tests/tck/issues/901.test.ts b/packages/graphql/tests/tck/issues/901.test.ts index aeba5a4c25..24d164710e 100644 --- a/packages/graphql/tests/tck/issues/901.test.ts +++ b/packages/graphql/tests/tck/issues/901.test.ts @@ -36,7 +36,7 @@ describe("https://github.com/neo4j/graphql/issues/901", () => { manufacturer: Series @relationship(type: "HAS_MANUFACTURER", direction: OUT, properties: "Properties") } - interface Properties { + interface Properties @relationshipProperties { current: Boolean } `; diff --git a/packages/graphql/tests/tck/issues/988.test.ts b/packages/graphql/tests/tck/issues/988.test.ts index 28d6649b7b..e887329711 100644 --- a/packages/graphql/tests/tck/issues/988.test.ts +++ b/packages/graphql/tests/tck/issues/988.test.ts @@ -47,7 +47,7 @@ describe("https://github.com/neo4j/graphql/issues/988", () => { current: Boolean! } - interface RelationProps { + interface RelationProps @relationshipProperties { current: Boolean! } `; diff --git a/packages/graphql/tests/tck/operations/update.test.ts b/packages/graphql/tests/tck/operations/update.test.ts index f15d67fe1b..0f1fdde10e 100644 --- a/packages/graphql/tests/tck/operations/update.test.ts +++ b/packages/graphql/tests/tck/operations/update.test.ts @@ -40,7 +40,7 @@ describe("Cypher Update", () => { actors: [Actor!]! @relationship(type: "ACTED_IN", properties: "ActedIn", direction: IN) } - interface ActedIn { + interface ActedIn @relationshipProperties { screenTime: Int } `; diff --git a/packages/graphql/tests/tck/subscriptions/create.test.ts b/packages/graphql/tests/tck/subscriptions/create.test.ts index fdfc3cc50f..a245695749 100644 --- a/packages/graphql/tests/tck/subscriptions/create.test.ts +++ b/packages/graphql/tests/tck/subscriptions/create.test.ts @@ -64,7 +64,7 @@ describe("Subscriptions metadata on create", () => { movies: [Movie!]! @relationship(type: "ACTED_IN", properties: "ActedIn", direction: OUT) } - interface ActedIn { + interface ActedIn @relationshipProperties { screenTime: Int! } `; @@ -239,7 +239,7 @@ describe("Subscriptions metadata on create", () => { movies: [Movie!]! @relationship(type: "ACTED_IN", properties: "ActedIn", direction: OUT) } - interface ActedIn { + interface ActedIn @relationshipProperties { screenTime: Int! } `; @@ -358,11 +358,11 @@ describe("Subscriptions metadata on create", () => { movies: [Movie!]! @relationship(type: "ACTED_IN", properties: "ActedIn", direction: OUT) } - interface ActedIn { + interface ActedIn @relationshipProperties { screenTime: Int! } - interface Directed { + interface Directed @relationshipProperties { year: Int! } @@ -486,11 +486,11 @@ describe("Subscriptions metadata on create", () => { movies: [Movie!]! @relationship(type: "ACTED_IN", properties: "ActedIn", direction: OUT) } - interface ActedIn { + interface ActedIn @relationshipProperties { screenTime: Int! } - interface Directed { + interface Directed @relationshipProperties { year: Int! } diff --git a/packages/ogm/src/generate.test.ts b/packages/ogm/src/generate.test.ts index 2f00d907b9..440f401000 100644 --- a/packages/ogm/src/generate.test.ts +++ b/packages/ogm/src/generate.test.ts @@ -893,7 +893,7 @@ describe("generate", () => { type Person { name: String! } - interface ActedIn { + interface ActedIn @relationshipProperties { screenTime: Int! } `;