Skip to content

accounts/graphql-api without gql-modulesΒ #824

@sakulstra

Description

@sakulstra

We're trying to use accounts-js for a few weeks, but are constantly facing problems with the dependency on graphql-modules.

We don't use graphql-modules for anything else, but accounts-js.
gql-modules usage breaks our custom modules workflow with hard to debug issues we shouldn't face in first place.

import { ApolloServer, makeExecutableSchema } from "apollo-server";

export const schema = makeExecutableSchema({
  typeDefs: modules.filter(m => m.typeDefs).map(m => m.typeDefs),
  resolvers: modules.filter(m => m.resolvers).map(m => m.resolvers),
  schemaDirectives: modules
    .filter(m => m.schemaDirectives)
    .reduce((acc, m) => {
      return {
        ...acc,
        ...m.schemaDirectives
      };
    }, {})
});

Somehow the accounts.typeDefs destroys our subscription setup with:

"message": "Schema is not configured for subscriptions.",

errors.

Would it be possible to have a raw export for graphql-api not using graphql-modules or sth similar?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions