Skip to content

Explain how to require @graphile/postgis in library mode with CommonJS #33

Open
@hengnee

Description

Hi, I'm not sure if this is the right place to ask such a question but I do apologies in advance.

but doing the following in my code:

const PostgisPlugin =  require("@graphile/postgis");
...
const postgraphileOpt = {
  watchPg: true,
  retryOnInitFail: true,
  graphiql: true,
  enhanceGraphiql: true,
  graphiqlRoute: "/schema",
  enableCors: true,
  disableQueryLog: true,
  appendPlugins: [ConnectionFilterPlugin, PostgisPlugin]
};

produced this error:

$ Error: Option 'appendPlugins' should be an array of functions, found 'object'  at index 1 ...

May I know if I'm doing it completely wrong or should I not have used it within the library but in the CLI instead?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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