Skip to content

Commit e2b7f86

Browse files
authored
adjusting formatting
this is 100% a shot in the dark. we'll see what comes of it.
1 parent c7c92b7 commit e2b7f86

File tree

1 file changed

+119
-117
lines changed

1 file changed

+119
-117
lines changed

docs/storefront/graphql/b2b/company-account-registration.mdx

Lines changed: 119 additions & 117 deletions
Original file line numberDiff line numberDiff line change
@@ -38,132 +38,134 @@ You may also need to include extra fields for Company accounts, Company users, a
3838
### Example Mutation
3939

4040
<Tabs items={[`Request`, `Response`]}>
41-
<Tab>
42-
43-
```graphql filename="Example mutation: Register a Company account" showLineNumbers copy
44-
mutation {
45-
company {
46-
registerCompany(
47-
input: {
48-
name: "Great Buys Incorporated",
49-
50-
phone: "5121234567",
51-
fileList:[
52-
{fileId: "uniquefile.pdf"}
53-
],
54-
address: {
55-
firstName: "Marie",
56-
lastName: "Curie",
57-
address1: "123 Main Street",
58-
city: "Austin",
59-
countryCode: "US",
60-
stateOrProvince: "Texas",
61-
phone: "5121234567",
62-
postalCode: "78704"
63-
# Address extra fields
64-
extraFields: {
65-
texts: [
66-
{ name: "Text Field Name", text: "Text Value" }
67-
],
68-
multilineTexts: [
69-
{ name: "Multiline Field Name", multilineText: "Multi-Line Text Value" }
70-
],
71-
multipleChoices: [
72-
{ name: "Multiple Choice Field Name", fieldValue: "Choice Value" }
73-
],
74-
numbers: [
75-
{ name: "Number Field Name", number: 1.0 }
76-
]
77-
}
78-
},
79-
# Company account extra fields
80-
extraFields: {
81-
texts: [
82-
{ name: "Text Field Name", text: "Text Value" }
83-
],
84-
multilineTexts: [
85-
{ name: "Multiline Field Name", multilineText: "Multi-Line Text Value" }
86-
],
87-
multipleChoices: [
88-
{ name: "Multiple Choice Field Name", fieldValue: "Choice Value" }
89-
],
90-
numbers: [
91-
{ name: "Number Field Name", number: 1.0 }
92-
]
93-
},
94-
# Company user extra fields
95-
companyUser: {
96-
extraFields: {
97-
texts: [
98-
{ name: "Text Field Name", text: "Text Value" }
99-
],
100-
multilineTexts: [
101-
{ name: "Multiline Field Name", multilineText: "Multi-Line Text Value" }
102-
],
103-
multipleChoices: [
104-
{ name: "Multiple Choice Field Name", fieldValue: "Choice Value" }
105-
],
106-
numbers: [
107-
{ name: "Number Field Name", number: 1.0 }
108-
]
109-
}
110-
}
111-
}
112-
) {
113-
entityId
114-
status
115-
errors {
116-
... on ValidationError {
117-
message
118-
path
119-
}
120-
}
41+
<Tab>
42+
43+
```graphql filename="Example mutation: Register a Company account" showLineNumbers copy
44+
mutation {
45+
company {
46+
registerCompany(
47+
input: {
48+
name: "Great Buys Incorporated",
49+
50+
phone: "5121234567",
51+
fileList:[
52+
{fileId: "uniquefile.pdf"}
53+
],
54+
address: {
55+
firstName: "Marie",
56+
lastName: "Curie",
57+
address1: "123 Main Street",
58+
city: "Austin",
59+
countryCode: "US",
60+
stateOrProvince: "Texas",
61+
phone: "5121234567",
62+
postalCode: "78704"
63+
# Address extra fields
64+
extraFields: {
65+
texts: [
66+
{ name: "Text Field Name", text: "Text Value" }
67+
],
68+
multilineTexts: [
69+
{ name: "Multiline Field Name", multilineText: "Multi-Line Text Value" }
70+
],
71+
multipleChoices: [
72+
{ name: "Multiple Choice Field Name", fieldValue: "Choice Value" }
73+
],
74+
numbers: [
75+
{ name: "Number Field Name", number: 1.0 }
76+
]
77+
}
78+
},
79+
# Company account extra fields
80+
extraFields: {
81+
texts: [
82+
{ name: "Text Field Name", text: "Text Value" }
83+
],
84+
multilineTexts: [
85+
{ name: "Multiline Field Name", multilineText: "Multi-Line Text Value" }
86+
],
87+
multipleChoices: [
88+
{ name: "Multiple Choice Field Name", fieldValue: "Choice Value" }
89+
],
90+
numbers: [
91+
{ name: "Number Field Name", number: 1.0 }
92+
]
93+
},
94+
# Company user extra fields
95+
companyUser: {
96+
extraFields: {
97+
texts: [
98+
{ name: "Text Field Name", text: "Text Value" }
99+
],
100+
multilineTexts: [
101+
{ name: "Multiline Field Name", multilineText: "Multi-Line Text Value" }
102+
],
103+
multipleChoices: [
104+
{ name: "Multiple Choice Field Name", fieldValue: "Choice Value" }
105+
],
106+
numbers: [
107+
{ name: "Number Field Name", number: 1.0 }
108+
]
109+
}
121110
}
111+
}
112+
) {
113+
entityId
114+
status
115+
errors {
116+
... on ValidationError {
117+
message
118+
path
122119
}
120+
}
123121
}
124-
```
125-
</Tab>
126-
<Tab>
127-
128-
```json filename="Example mutation: Register a customer" showLineNumbers copy
129-
# Success
130-
131-
{
132-
"data": {
133-
"company": {
134-
"registerCompany": {
135-
"entityId": 123456,
136-
"status": "PENDING",
137-
"errors": []
138-
}
139-
}
122+
}
123+
}
124+
```
125+
126+
</Tab>
127+
<Tab>
128+
129+
```json filename="Example mutation: Register a customer" showLineNumbers copy
130+
# Success
131+
132+
{
133+
"data": {
134+
"company": {
135+
"registerCompany": {
136+
"entityId": 123456,
137+
"status": "PENDING",
138+
"errors": []
140139
}
141140
}
142-
143-
144-
# Error - Customer not authenticated
145-
146-
{
147-
"data": {
148-
"company": {
149-
"registerCompany": {
150-
"entityId": null,
151-
"status": null,
152-
"errors": [
153-
{
154-
"__typename": "ValidationError",
155-
"message": "Customer not authenticated",
156-
"path": [
157-
"input"
158-
]
159-
}
141+
}
142+
}
143+
144+
145+
# Error - Customer not authenticated
146+
147+
{
148+
"data": {
149+
"company": {
150+
"registerCompany": {
151+
"entityId": null,
152+
"status": null,
153+
"errors": [
154+
{
155+
"__typename": "ValidationError",
156+
"message": "Customer not authenticated",
157+
"path": [
158+
"input"
160159
]
161160
}
162-
}
161+
]
163162
}
164163
}
165-
```
166-
</Tab>
164+
}
165+
}
166+
```
167+
168+
</Tab>
167169
</Tabs>
168170

169171
### Considerations

0 commit comments

Comments
 (0)