enum LocalWorkItemType {
  FEATURE
}

enum LocalWidgetType {
  TITLE
}

interface LocalWorkItemWidget {
  type: LocalWidgetType!
}

# Replicating Relay connection type for client schema
type LocalWorkItemWidgetEdge {
  cursor: String!
  node: LocalWorkItemWidget
}

type LocalWorkItemWidgetConnection {
  edges: [LocalWorkItemWidgetEdge]
  nodes: [LocalWorkItemWidget]
  pageInfo: PageInfo!
}

type LocalWorkItem {
  id: ID!
  type: LocalWorkItemType!
  title: String!
  widgets: [LocalWorkItemWidgetConnection]
}

input LocalCreateWorkItemInput {
  title: String!
}

input LocalUpdateWorkItemInput {
  id: ID!
  title: String
}

type LocalCreateWorkItemPayload {
  workItem: LocalWorkItem!
}

type LocalUpdateWorkItemPayload {
  workItem: LocalWorkItem!
}

extend type Query {
  localWorkItem(id: ID!): LocalWorkItem!
}

extend type Mutation {
  localCreateWorkItem(input: LocalCreateWorkItemInput!): LocalCreateWorkItemPayload!
  localUpdateWorkItem(input: LocalUpdateWorkItemInput!): LocalUpdateWorkItemPayload!
}
