Skip to content

How to correctly use useMaster with graphql-sequelize? #719

@AnderLuiz

Description

@AnderLuiz

Hi everyone,

I would like to know how to correctly use useMaster with graphql-sequelize.

I'm trying to force the query to go to the master database using this code:

before: (findOptions) => {
  const options = findOptions;
  options.useMaster = true;
  return options;
}

However, even setting useMaster: true, the query still goes to the replica.

I'm also using dataloader-sequelize integrated with graphql-sequelize.

Is there a correct way to make it work?
Or is there any additional configuration needed to make useMaster respected?

Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions