Some docs contain <objectName>?

I’ve noticed on some of the B2B mutations that in the example inputs it’s mentioning <objectName> rather than the actual resource.

For example:

{
  "companyId": "gid://shopify/<objectName>/10079785100",
  "input": {
    "customerSince": "2019-09-07T15:50:00Z",
    "externalId": "<your-externalId>",
    "name": "<your-name>",
    "note": "<your-note>"
  }
}

And another companyLocationAssignStaffMembers - GraphQL Admin

{
  "companyLocationId": "gid://shopify/<objectName>/10079785100",
  "staffMemberIds": [
    "gid://shopify/<objectName>/10079785100"
  ]
}

It only specify’s an ID should be passed, but no mention of what resource(s) we can actually pass, for example should I just be passing a customer GID here?

Could we get some clarity here as it seems quite a few mutation docs are the same.

1 Like

Hey @Luke!

When you see <objectName> in our examples, it should be replaced with the specific resource type for that GID. Our docs could definitely be clearer here.

For the examples you mentioned, the correct GID formats would be:

  • For companies: gid://shopify/Company/10079785100
  • For company locations: gid://shopify/CompanyLocation/10079785100

The best way to confirm the exact GID structure for any resource is to run a query for that resource type first.

We also have some common GID formats documented here although it’s not an exhaustive list:

The feedback is noted :notebook:

Hey Kyle, surely the best way would be to say what resources are required/accepted in the docs rather than making requests? :thinking:

I agree with you completely!