Skip to main content

How to show edge source properties stored in separate type using GraphQL query [Community Contributed]

  • February 10, 2024
  • 0 replies
  • 70 views

Forum|alt.badge.img+5

In the below GraphQL schema actors [Person] edge properties (role, compensation) are captured in ActedIn type. How to get edge properties of the Actor stored in separate type using GraphQL query.

 

type Movie {
title: String
actors: [Person]
@relation(
edgeSource: "ActedIn"
type: { space: "imdb", externalId: "HAS_ACTOR" }
direction: OUTWARDS
)
director: Person
}

type Person {
name: String!
}

type ActedIn @edge {
role: String
compensation: Float
metadata: JSONObject
lines: [String]
}