Skip to content

Commit

Permalink
Update apollo subgraph compatibility tests
Browse files Browse the repository at this point in the history
  • Loading branch information
angrykoala committed Nov 19, 2024
1 parent 14f2b8c commit d6e4024
Showing 1 changed file with 34 additions and 5 deletions.
39 changes: 34 additions & 5 deletions packages/apollo-federation-subgraph-compatibility/src/type-defs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,31 @@ export const typeDefs = gql`
id: ID!
sku: String
package: String
variation: ProductVariation @relationship(type: "HAS_VARIATION", direction: OUT)
dimensions: ProductDimension @relationship(type: "HAS_DIMENSIONS", direction: OUT)
createdBy: User @provides(fields: "totalProductsCreated") @relationship(type: "CREATED_BY", direction: OUT)
variation: ProductVariation
@cypher(
statement: """
MATCH (this)-[:HAS_VARIATION]->(res:ProductVariation)
RETURN res
"""
columnName: "res"
)
dimensions: ProductDimension
@cypher(
statement: """
MATCH (this)-[:HAS_DIMENSIONS]->(res:ProductDimension)
RETURN res
"""
columnName: "res"
)
createdBy: User
@provides(fields: "totalProductsCreated")
@cypher(
statement: """
MATCH (this)-[:CREATED_BY]->(res:User)
RETURN res
"""
columnName: "res"
)
notes: String @tag(name: "internal")
research: [ProductResearch!]! @relationship(type: "HAS_RESEARCH", direction: OUT)
}
Expand All @@ -57,15 +79,22 @@ export const typeDefs = gql`
sku: String!
package: String!
reason: String
createdBy: User @relationship(type: "CREATED_BY", direction: OUT)
createdBy: [User!]! @relationship(type: "CREATED_BY", direction: OUT)
}
type ProductVariation {
id: ID!
}
type ProductResearch @key(fields: "study { caseNumber }") {
study: CaseStudy! @relationship(type: "HAS_STUDY", direction: OUT)
study: CaseStudy!
@cypher(
statement: """
MATCH (this)-[:HAS_STUDY]->(res:CaseStudy)
RETURN res
"""
columnName: "res"
)
outcome: String
}
Expand Down

0 comments on commit d6e4024

Please sign in to comment.