I defined the type Vertrag without @bb_owned, but when i run the createVertrag query i get an error, that the field .ownerId is required.
When I add the field manually on the database, the query works fine.
I just compiled the schema.graphql and initialized the database with the sql script.
See Type Vertrag and CreateVertrag. These are parts of the schema file.
directive @bb_primaryKey on FIELD_DEFINITION
directive @bb_resolver on FIELD_DEFINITION
scalar DueDate @bb_scalar(_type: “Date”)
type Vertrag {
id: ID!
name: String!
hik: Int!
description: String
gueltigvon: DueDate!
gueltigbis: DueDate!
}
createVertrag(
name: String!,
description: String,
hik: Int!
gueltigvon: DueDate!,
gueltigbis: DueDate!
): Task
@bb_resolver(
_type: INSERT,
_object: Vertrag,
_fields: {
name: “$name”,
description: “$description”,
hik: “$hik”,
gueltigvon: “$gueltigvon”,
gueltigbis: “$gueltigbis”)