Custom Input type with "connect" syntax for related documents

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?

Hi @kdougan,

Our apologies that your question has been unanswered for such a long time. However, I’m unable to answer the question since the question confuses me.

The CalendarInput maps exactly on the Calendar type. In case we would allow you to override the input, how would that overriden type look? What would you like to change about it? There might be a good reason to change it but I would need some help seeing it. If we do allow this though it would probably become impossible or very hard for Fauna to create a Calendar from a CalendarInput except if we allow you to also write a custom mapping.

Today we don’t have such functionality. Let us know what your usecase is, maybe it makes sense to create a feature request once we learn more.