Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions graphql/resolvers.js
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,10 @@ const resolvers = {
return beacon;
},

deleteBeacon: async (_, {beaconID}) =>{
return await Beacon.findByIdAndRemove(beaconID);
},

joinBeacon: async (_, { shortcode }, { user, pubsub }) => {
const beacon = await Beacon.findOne({ shortcode });

Expand Down
1 change: 1 addition & 0 deletions graphql/schema.js
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@ const typeDefs = gql`
if start time not supplied, default is Date.now
"""
createBeacon(beacon: BeaconInput): Beacon!
deleteBeacon(beaconID: ID!): Beacon!
createLandmark(landmark: LandmarkInput, beaconID: ID!): Landmark!
register(user: RegistrationInput): User!
"""
Expand Down