Focuses on API authentication, access scopes, and permission management.
Hey everyone,
Im currently tying to get acces to the grapthql api from my custom app. However, Im getting the following error every time I run the query:
"Invalid host, redirecting to login path | {host: null}"
code:
const { admin } = await authenticate.admin(request);
const response = await admin.graphql(
`#graphql
query getProductById($id: ID!) {
product(id: $id) {
title
}
}`,
{
variables: {
id: "gid://shopify/Product/7676292956318"
}
}
);
Im not able to authenticate and I guess the issue might be the (request) beeing passed to the admin().