Just for other people, I came across this answer, and I was still confused about whether I could implement GraphQL api in Loopback or not. I used the Apollo apollo-server package for Express. Since Loopback is based on Express, calling
app.use('/graphql', bodyParser.json(), graphqlExpress({schema})); app.use('graphiql', graphiqlExpress({ endpointURL: "/graphql" }))
works great. Just follow the instructions for the Express code and it should work. As for the database stuff, it seems that you can use converters as a middle tier instead of remote Loopback methods. For each resolver that points to a piece of data, you can call the context method app to retrieve data from your database.
source share