Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- - schema.graphql -----------------------
- type Query
- "A datetime string with format `Y-m-d H:i:s`, e.g. `2018-01-01 13:00:00`."
- scalar DateTime @scalar(class: "Nuwave\\Lighthouse\\Schema\\Types\\Scalars\\DateTime")
- "A date string with format `Y-m-d`, e.g. `2011-05-23`."
- scalar Date @scalar(class: "Nuwave\\Lighthouse\\Schema\\Types\\Scalars\\Date")
- # import *.graphql
- - events.graphql -----------------------
- type Event {
- id: ID!
- name: String!
- description: String
- location: String
- date: Date
- created_at: DateTime
- updated_at: DateTime
- }
- extend type Query {
- events: [Event!]! @paginate(model: "App\\Event" defaultCount: 25)
- event(id: ID @eq): Event @find(model: "App\\Event")
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement