vue-cli-plugin-apollo
Version:
vue-cli 3 plugin to add Apollo and GraphQL
20 lines (18 loc) • 417 B
JavaScript
<% if (addExamples) { _%>
import { db } from './utils/db'
import { processUpload } from './utils/upload'
<%_ } %>
// Context passed to all resolvers (third argument)
// req => Query
// connection => Subscription
// eslint-disable-next-line no-unused-vars
export default ({ req, connection }) => {
return {
<% if (addExamples) { _%>
db,
processUpload,
<%_ } else { %>
// Put objects here
<%_ } %>
}
}