Skip to content

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

@hengnee

Description

@hengnee

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions