Skip to content

Instantly share code, notes, and snippets.

@nicko170
Last active October 11, 2021 21:52
Show Gist options
  • Select an option

  • Save nicko170/a95b1e6480f7a582f3307a2ad559d232 to your computer and use it in GitHub Desktop.

Select an option

Save nicko170/a95b1e6480f7a582f3307a2ad559d232 to your computer and use it in GitHub Desktop.
RFSPager Lighthouse Schema
type Capcode {
id: ID!
alias: String!
agency: String!
icon: String!
colour: String!
latestMessage: Message
}
type Message {
id: ID!
capcode: Capcode
created_at: DateTime!
message: String!
address: String!
responders: [Responder!]!
}
type Query {
capcodes(search: String @scope(name: "search"), orderBy: _ @orderBy): [Capcode]! @all @orderBy(column: "updated_at", direction: DESC) @guard
message(id: ID! @eq): Message @find @guard
messages(limit: Int @limit, order: _ @orderBy(columns: ["created_at"]), where: _ @whereConditions(columns: ["created_at"])): [Message]! @all @orderBy(column: "created_at", direction: DESC) @guard
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment