appInfo
نظرة عامة
استرجع معلومات المتجر (العلامة التجارية، الروابط، الإعدادات العامة). اسم GraphQL Query هو getAppInfo، لكن هذه الصفحة تشير إلى المورد كمتجر.
- النوع: GraphQL Query
- Endpoint: https://subdomain.com
- المصادقة:
Authorization: Bearer <TOKEN>
Query
query GetAppInfo {
getAppInfo {
success
message
data {
_id
name
subdomain
logo { _id fileUrl }
description
url
generalSettings {
font { _id sources title }
palette {
_id
name
mainColor
subColor
footerColor
backgroundColor
backgroundImageUrl
}
country {
_id
name
image { image imageUrl }
code
continent
capital
active
deleted
phonekey
}
currency { _id title currencyCode currencySymbol }
}
}
}
}
أمثلة
- cURL
- JavaScript (fetch)
curl -X POST \
https://subdomain.com \
-H "Content-Type: application/json" \
-H "Authorization: Bearer <TOKEN>" \
--data-binary @- << 'EOF'
{
"query": "query GetAppInfo { getAppInfo { success message data { _id name subdomain url } } }"
}
EOF
const res = await fetch('https://subdomain.com', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
Authorization: 'Bearer ' + token,
},
body: JSON.stringify({
query: `
query GetAppInfo {
getAppInfo { success message data { _id name subdomain url } }
}
`,
}),
});
const json = await res.json();
ملاحظات
- حقل GraphQL يسمى
getAppInfo؛ هذه الصفحة تعامله كمعلومات المتجر لوضوح التوثيق. - قلل أو وسّع الحقول المحددة وفقاً لاحتياجات واجهتك.