Slide 14
Slide 14 text
Creating the guitar service
type Query {
guitarById(id: ID): GuitarDto
ownerById(id: ID): OwnerDto
}
type GuitarDto {
id: ID
brand: String
model: String
year: Int
owner: OwnerDto
}
type OwnerDto {
id: ID
firstName: String
lastName: String
}
schema.graphqls - By default,
this file is kept in the
resources folder. Spring
GraphQL knows to find it
there