Форум по Javascript
-
Anonymous
Ошибка Shopify: поле «CustomerbyIdentifier» не существует на типе 'QueryRoot'
Сообщение
Anonymous »
Код: Выделить всё
export const loader = async ({ request }: LoaderFunctionArgs) => {
await authenticate.admin(request);
const admin = await authenticate.admin(request);
const email = "some@mail.com";
const response = await admin.admin.graphql(
`#graphql
query GetCustomers($query: String!) {
customerByIdentifier(identifier: {emailAddress: $query}) {
id
}
}
`,
{
variables: { query: email }
}
);
const data = await response.json();
console.log(">>>>> data", data, "
Подробнее здесь: [url]https://stackoverflow.com/questions/79455192/shopify-error-field-customerbyidentifier-doesnt-exist-on-type-queryroot[/url]
1740071210
Anonymous
[code]export const loader = async ({ request }: LoaderFunctionArgs) => {
await authenticate.admin(request);
const admin = await authenticate.admin(request);
const email = "some@mail.com";
const response = await admin.admin.graphql(
`#graphql
query GetCustomers($query: String!) {
customerByIdentifier(identifier: {emailAddress: $query}) {
id
}
}
`,
{
variables: { query: email }
}
);
const data = await response.json();
console.log(">>>>> data", data, "
Подробнее здесь: [url]https://stackoverflow.com/questions/79455192/shopify-error-field-customerbyidentifier-doesnt-exist-on-type-queryroot[/url]