mirror of
https://github.com/brendan-ch/project-inter-server.git
synced 2026-04-17 07:50:31 +00:00
remove required parking structure and add stub resolvers
This commit is contained in:
@@ -10,7 +10,7 @@ type System {
|
||||
|
||||
# TODO: Implement these in system resolvers
|
||||
parkingStructures: [ParkingStructure!]
|
||||
parkingStructure(id: ID): ParkingStructure!
|
||||
parkingStructure(id: ID): ParkingStructure
|
||||
}
|
||||
|
||||
type ParkingStructure {
|
||||
|
||||
@@ -70,13 +70,19 @@ export const SystemResolvers: Resolvers<ServerContext> = {
|
||||
|
||||
return shuttle;
|
||||
},
|
||||
shuttles: async (parent, args, contextValue, _info) => {
|
||||
shuttles: async (parent, _args, contextValue, _info) => {
|
||||
const system = contextValue.findSystemById(parent.id);
|
||||
if (!system) {
|
||||
return [];
|
||||
}
|
||||
|
||||
return await system.shuttleRepository.getShuttles();
|
||||
}
|
||||
},
|
||||
parkingStructures: async (_parent, _args, _contextValue, _info) => {
|
||||
return [];
|
||||
},
|
||||
parkingStructure: async (_parent, _args, _contextValue, _info) => {
|
||||
return null;
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user