-
One or more employees must belong to a department and each employee instance is non nullable. Below type is accepted through UI in CDF.
type Department {
name: String!,
employees: [Employee!]!
}
2. Zero or more employees can belong to a department and it can be a null object or an employee instance. Below type is accepted through UI in CDF.
type Department {
name: String!,
employees: [Employee]
}
3. Zero or more employees can belong to a department and it has to be a non null employee instance. Below type isn't accepted through UI in CDF.
type Department {
name: String!,
employees: [Employee!]
}
I am trying to enforce field nullability use case as suggested here - https://www.apollographql.com/docs/apollo-server/schema/schema/#field-nullability
Below example may make my above question more meaningful in the CDF FDM context.
type Department {
name: String!,
employees: [String!]
}
-
How can I ensure that the list of strings are non-nulls?
-
Also, Would Strings be stored in a separate node and connected through edges or would the list of Strings be stored in the same node instance?