mirror of
https://github.com/brendan-ch/project-inter-server.git
synced 2026-04-19 08:50:29 +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
|
# TODO: Implement these in system resolvers
|
||||||
parkingStructures: [ParkingStructure!]
|
parkingStructures: [ParkingStructure!]
|
||||||
parkingStructure(id: ID): ParkingStructure!
|
parkingStructure(id: ID): ParkingStructure
|
||||||
}
|
}
|
||||||
|
|
||||||
type ParkingStructure {
|
type ParkingStructure {
|
||||||
|
|||||||
@@ -70,13 +70,19 @@ export const SystemResolvers: Resolvers<ServerContext> = {
|
|||||||
|
|
||||||
return shuttle;
|
return shuttle;
|
||||||
},
|
},
|
||||||
shuttles: async (parent, args, contextValue, _info) => {
|
shuttles: async (parent, _args, contextValue, _info) => {
|
||||||
const system = contextValue.findSystemById(parent.id);
|
const system = contextValue.findSystemById(parent.id);
|
||||||
if (!system) {
|
if (!system) {
|
||||||
return [];
|
return [];
|
||||||
}
|
}
|
||||||
|
|
||||||
return await system.shuttleRepository.getShuttles();
|
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