Given the following [partial] schema:
type Calendar @collection(name: "calendars") {
name: String!
owner: User! @relation
entries(start: Date, end: Date): [Entry!]! @relation
public: Boolean!
}
type Entry @collection(name: "entries") {
calendar: Calendar! @relation
title: String!
description: String
start: Time!
end: Time!
startDate: Date!
endDate: Date!
status: EntryStatus!
recurrence: String
recurrenceEndDate: Date
restricted: Boolean
}
I am trying to create a custom input type for Entries
:
input EntryInput {
calendar: CalendarInput // <-- I know this doesn't work
title: String!
description: String = ""
start: Time!
end: Time!
status: EntryStatus = CONFIRMED
recurrence: String
recurrenceEndDate: Date
restricted: Boolean = false
}
The owner
field of the Calendar
object allows for the standard mutation:
mutation {
createCalendar(data: {
owner: {connect: <id>},
name: "Untitled 1",
public: false
}) {
_id
name
}
}
Is there a way to allow for the standard, auto-generated input functionality while using custom input types?