Adobe Commerce only. Learn more.

giftRegistryTypes query

The giftRegistryTypes query returns a list of available gift registry types.

Syntax

1
giftRegistryTypes: [GiftRegistryType]

Example usage

The following example returns information about the list of available gift registry types.

Request:

1
2
3
4
5
6
7
8
9
10
11
12
query{
  giftRegistryTypes{
    label
    uid
    dynamic_attributes_metadata {
      label
      input_type
      is_required
      code
    }
  }
}

Response:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
{
  "data": {
    "giftRegistryTypes": [
      {
        "label": "Birthday",
        "uid": "MQ==",
        "dynamic_attributes_metadata": [
          {
            "label": "Country",
            "input_type": "country",
            "is_required": true,
            "code": "event_country"
          },
          {
            "label": "Event Date",
            "input_type": "date",
            "is_required": true,
            "code": "event_date"
          }
        ]
      },
      {
        "label": "Baby Registry",
        "uid": "Mg==",
        "dynamic_attributes_metadata": [
          {
            "label": "Role",
            "input_type": "select",
            "is_required": true,
            "code": "role"
          },
          {
            "label": "Country",
            "input_type": "country",
            "is_required": true,
            "code": "event_country"
          },
          {
            "label": "Baby Gender",
            "input_type": "select",
            "is_required": true,
            "code": "baby_gender"
          }
        ]
      },
      {
        "label": "Wedding",
        "uid": "Mw==",
        "dynamic_attributes_metadata": [
          {
            "label": "Role",
            "input_type": "select",
            "is_required": true,
            "code": "role"
          },
          {
            "label": "Country",
            "input_type": "country",
            "is_required": true,
            "code": "event_country"
          },
          {
            "label": "Wedding Date",
            "input_type": "date",
            "is_required": true,
            "code": "event_date"
          },
          {
            "label": "Location",
            "input_type": "text",
            "is_required": true,
            "code": "event_location"
          },
          {
            "label": "Number of Guests",
            "input_type": "text",
            "is_required": true,
            "code": "number_of_guests"
          }
        ]
      }
    ]
  }
}

Output attributes

The giftRegistryTypes array returns the following attributes:

Attribute Data Type Description
dynamic_attributes_metadata [GiftRegistryDynamicAttributeMetadataInterface] An array of attributes that define elements of the gift registry. Each attribute is specified as a code-value pair
label String! The display name of the gift registry type
uid ID! The unique ID assigned to the gift registry

GiftRegistryDynamicAttributeMetadataInterface attributes

The GiftRegistryDynamicAttributeMetadata data type implements the GiftRegistryDynamicAttributeMetadataInterface.

This interface contains the following attributes:

Attribute Data Type Description
attribute_group String! Indicates which group of the dynamic attribute a member of
code ID! The internal ID of the dynamic attribute
input_type String! The input type of the dynamic attribute
is_required Boolean! Indicates whether the dynamic attribute is required
label String! The display name of the dynamic attribute
sort_order Int The order in which to display the dynamic attribute