Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unexpected behaviour when using Chain #401

Closed
AleksanderBondar opened this issue Jun 6, 2024 · 1 comment
Closed

Unexpected behaviour when using Chain #401

AleksanderBondar opened this issue Jun 6, 2024 · 1 comment

Comments

@AleksanderBondar
Copy link
Contributor

Screenshot 2024-06-06 at 11 24 05

Possible solution on Thunder.

o: Z & { [P in keyof Z]: P extends keyof ValueTypes[R] ? Z[P] : P extends keyof SCLR ? Z[P] : never; }
@AleksanderBondar
Copy link
Contributor Author

Resolved by using generic parameter for Chain

const chain = <T extends 'query' | 'mutation'>(option: T) =>
  Chain(`${process.env.SHOP_HOST || 'http:https://localhost:3001'}/admin-api`, {
    headers: {
      'Content-type': 'application/json',
      Authorization: `Bearer `,
      // ...(channel ? { 'vendure-token': channel } : {}),
    },
  })(option, { scalars });

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant