MCPcopy Index your code
hub / github.com/apollographql/fullstack-tutorial / bookTrip

Method bookTrip

final/server/src/datasources/user.js:53–59  ·  view source on GitHub ↗
({ launchId })

Source from the content-addressed store, hash-verified

51 }
52
53 async bookTrip({ launchId }) {
54 const userId = this.context.user.id;
55 const res = await this.store.trips.findOrCreate({
56 where: { userId, launchId },
57 });
58 return res && res.length ? res[0].get() : false;
59 }
60
61 async cancelTrip({ launchId }) {
62 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