MCPcopy Create free account
hub / github.com/apollographql/fullstack-tutorial / bookTrip

Method bookTrip

start/server/src/datasources/user.js:50–56  ·  view source on GitHub ↗
({ launchId })

Source from the content-addressed store, hash-verified

48 }
49
50 async bookTrip({ launchId }) {
51 const userId = this.context.user.id;
52 const res = await this.store.trips.findOrCreate({
53 where: { userId, launchId },
54 });
55 return res && res.length ? res[0].get() : false;
56 }
57
58 async cancelTrip({ launchId }) {
59 const userId = this.context.user.id;

Callers 2

bookTripsMethod · 0.95
user.jsFile · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected