Expose places over GraphQL
All checks were successful
Build and deploy Backend / build (push) Successful in 1m1s
All checks were successful
Build and deploy Backend / build (push) Successful in 1m1s
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
import { GraphQLJSONObject } from './scalars.js';
|
||||
import { listPlaces, listVoiceExperiences } from './places.js';
|
||||
import { createVoiceExperience } from './voice-experiences.js';
|
||||
|
||||
export const schema = /* GraphQL */ `
|
||||
@@ -19,6 +20,7 @@ export const schema = /* GraphQL */ `
|
||||
name: String!
|
||||
latitude: Float!
|
||||
longitude: Float!
|
||||
experiences: [VoiceExperience!]!
|
||||
}
|
||||
|
||||
type VoiceExperience {
|
||||
@@ -43,6 +45,8 @@ export const schema = /* GraphQL */ `
|
||||
|
||||
type Query {
|
||||
health: String!
|
||||
places: [Place!]!
|
||||
voiceExperiences: [VoiceExperience!]!
|
||||
}
|
||||
|
||||
type Mutation {
|
||||
@@ -54,6 +58,8 @@ export const resolvers = {
|
||||
JSON: GraphQLJSONObject,
|
||||
Query: {
|
||||
health: () => 'ok',
|
||||
places: () => listPlaces(),
|
||||
voiceExperiences: () => listVoiceExperiences(),
|
||||
},
|
||||
Mutation: {
|
||||
createVoiceExperience: async (
|
||||
|
||||
Reference in New Issue
Block a user