Skip to content

Can we drop this repo in favor of @gramps/gramps? #46

Description

@jlengstorf

In looking at the various Apollo server implementations, the config object (GraphQLOptions) appears to be the same in all situations.

We need to test that, but if that's true, there's really no need to use this middleware. Instead, the API can be simplified in a universally applicable way to:

import gramps from '@gramps/gramps';

const getGraphQLOptions = gramps({ dataSources: [] });

In Express/Connect, we would use:

app.use('/graphql', bodyParser.json());
app.use('/graphql', graphqlConnect(getGraphQLOptions));

In Hapi:

server.register({
  register: graphqlHapi,
  options: {
    path: '/graphql',
    graphqlOptions: getGraphQLOptions,
  },
});

Koa:

app.use(koaBody());
router.post('/graphql', graphqlKoa(getGraphQLOptions));
app.use(router.routes());

Once @gramps/gramps hits a stable release, let's look at deprecating this repo altogether.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions