GraphQL Account API Reference
Queries
account
Description
An account.
Response
Returns an Account!
Example
Query
query account {
account {
accountInfo {
...AccountInfoFragment
}
apps {
...AppsConnectionFragment
}
id
stores {
...StoreConnectionFragment
}
users {
...UserConnectionFragment
}
}
}
Response
{
"data": {
"account": {
"accountInfo": AccountInfo,
"apps": AppsConnection,
"id": 4,
"stores": StoreConnection,
"users": UserConnection
}
}
}
node
Description
Fetches an object given its ID.
nodes
Description
Fetches objects given their IDs.
system
Description
System settings.
Response
Returns a System!
Example
Query
query system {
system {
time
}
}
Response
{"data": {"system": {"time": {}}}}
Mutations
account
Description
Account mutations.
Response
Returns an AccountMutations!
Example
Query
mutation account {
account {
addUserToAccount {
...AddUserToAccountResultFragment
}
removeUserFromAccount {
...RemoveUserFromAccountResultFragment
}
}
}
Response
{
"data": {
"account": {
"addUserToAccount": AddUserToAccountResult,
"removeUserFromAccount": RemoveUserFromAccountResult
}
}
}
user
Description
User mutations.
Response
Returns a UserMutations!
Example
Query
mutation user {
user {
addUserToStore {
...AddUserToStoreResultFragment
}
createUserWithPassword {
...CreateUserWithPasswordResultFragment
}
removeUserFromStore {
...RemoveUserFromStoreResultFragment
}
}
}
Response
{
"data": {
"user": {
"addUserToStore": AddUserToStoreResult,
"createUserWithPassword": CreateUserWithPasswordResult,
"removeUserFromStore": RemoveUserFromStoreResult
}
}
}
Types
Account
Description
An account.
Fields
Field Name | Description |
---|---|
accountInfo - AccountInfo!
|
Provides account details. |
apps - AppsConnection!
|
Apps owned by the account. |
id - ID!
|
The ID of the object. |
stores - StoreConnection!
|
The stores related to an account. |
users - UserConnection!
|
Users belonging to the account. |
Example
{
"accountInfo": AccountInfo,
"apps": AppsConnection,
"id": "4",
"stores": StoreConnection,
"users": UserConnection
}
AccountInfo
Description
Account details.
Fields
Field Name | Description |
---|---|
name - String!
|
The name of an account. |
Example
{"name": "xyz789"}
AccountMutations
Description
Account mutations.
Fields
Field Name | Description |
---|---|
addUserToAccount - AddUserToAccountResult
|
Adds a user to an account. |
Arguments
|
|
removeUserFromAccount - RemoveUserFromAccountResult
|
Removes a user from an account. |
Arguments
|
Example
{
"addUserToAccount": AddUserToAccountResult,
"removeUserFromAccount": RemoveUserFromAccountResult
}
AddUserToAccountInput
Fields
Input Field | Description |
---|---|
email - String!
|
The email of the user to be added to the account. |
Example
{"email": "xyz789"}
AddUserToAccountResult
Fields
Field Name | Description |
---|---|
account - Account
|
An account the user was added to. |
Example
{"account": Account}
AddUserToStoreInput
Fields
Input Field | Description |
---|---|
storeId - ID!
|
The store the user is to be added. |
user - UserIdentifierInput!
|
The user to be added to the store. |
Example
{
"storeId": "4",
"user": UserIdentifierInput
}
AddUserToStoreResult
Fields
Field Name | Description |
---|---|
storeId - ID!
|
The ID of the object. |
Example
{"storeId": 4}
App
AppsConnection
Description
A connection to a list of items.
Fields
Field Name | Description |
---|---|
pageInfo - PageInfo!
|
Information to aid in pagination. |
edges - [AppsEdge]
|
A list of edges. |
Example
{
"pageInfo": PageInfo,
"edges": [AppsEdge]
}
AppsEdge
Boolean
Description
The Boolean
scalar type represents true
or false
.
Example
true
CreateUserWithPasswordInput
Fields
Input Field | Description |
---|---|
email - String!
|
The email of the user to be added to the account. |
firstName - String!
|
The first name of the user to be added to the account. |
lastName - String!
|
The last name of the user to be added to the account. |
locale - String!
|
The locale of the user to be added to the account. |
password - String!
|
The password of the user to be added to the account. |
passwordConfirmation - String!
|
Enter password again to confirm. |
Example
{
"email": "xyz789",
"firstName": "xyz789",
"lastName": "xyz789",
"locale": "xyz789",
"password": "abc123",
"passwordConfirmation": "xyz789"
}
CreateUserWithPasswordResult
Fields
Field Name | Description |
---|---|
user - User
|
Created user. |
Example
{"user": User}
DateTime
Description
ISO-8601 formatted date in UTC
Example
"2007-12-03T10:15:30Z"
ID
Description
The ID
scalar type represents a unique identifier, often used to re-fetch an object or as key for a cache.
Example
"4"
Int
Description
The Int
scalar type represents non-fractional signed whole numeric values. Int can represent values between -(2^31) and 2^31 - 1.
Example
123
Long
Description
The Long
scalar type represents non-fractional signed whole numeric values. Long can represent values between -(2^63) and 2^63 - 1.
Example
{}
Node
Description
An object with an ID.
Fields
Field Name | Description |
---|---|
id - ID!
|
The ID of the object. |
Example
{"id": "4"}
PageInfo
Description
Information about pagination in a connection.
Fields
Field Name | Description |
---|---|
hasNextPage - Boolean!
|
When paginating forwards, are there more items? |
hasPreviousPage - Boolean!
|
When paginating backwards, are there more items? |
startCursor - String
|
When paginating backwards, the cursor to continue. |
endCursor - String
|
When paginating forwards, the cursor to continue. |
Example
{
"hasNextPage": true,
"hasPreviousPage": false,
"startCursor": "abc123",
"endCursor": "xyz789"
}
RemoveUserFromAccountInput
RemoveUserFromAccountResult
RemoveUserFromStoreInput
RemoveUserFromStoreResult
Store
Description
A store related to an account.
Fields
Field Name | Description |
---|---|
id - ID!
|
The ID of the object. |
apps - AppsConnection!
|
The list of store apps. |
name - String!
|
The store name for the store. |
storeHash - String!
|
The store hash for the store. |
users - StoreUserConnection!
|
Users belonging to the store. |
Example
{
"id": 4,
"apps": AppsConnection,
"name": "xyz789",
"storeHash": "xyz789",
"users": StoreUserConnection
}
StoreConnection
Description
A connection to a list of items.
Fields
Field Name | Description |
---|---|
pageInfo - PageInfo!
|
Information to aid in pagination. |
edges - [StoreEdge]
|
A list of edges. |
Example
{
"pageInfo": PageInfo,
"edges": [StoreEdge]
}
StoreEdge
StoreUser
Description
A user belonging to an store.
Fields
Field Name | Description |
---|---|
id - ID!
|
The ID of the object. |
apps - AppsConnection!
|
Apps accessible by the user on the store. |
email - String!
|
The email for the user. |
firstName - String!
|
First name. |
lastLoginAt - DateTime
|
When the user last logged in. |
lastName - String!
|
Last name. |
locale - String!
|
User preferred locale. |
permissions - [String!]!
|
The permissions for the user on the store. |
status - StoreUserStatus
|
Current status of the user for the store. |
updatedAt - DateTime
|
When was the user last updated. |
Example
{
"id": "4",
"apps": AppsConnection,
"email": "xyz789",
"firstName": "xyz789",
"lastLoginAt": "2007-12-03T10:15:30Z",
"lastName": "abc123",
"locale": "abc123",
"permissions": ["abc123"],
"status": "ACTIVE",
"updatedAt": "2007-12-03T10:15:30Z"
}
StoreUserConnection
Description
A connection to a list of items.
Fields
Field Name | Description |
---|---|
pageInfo - PageInfo!
|
Information to aid in pagination. |
edges - [StoreUserEdge]
|
A list of edges. |
Example
{
"pageInfo": PageInfo,
"edges": [StoreUserEdge]
}
StoreUserEdge
Description
An edge in a connection.
Fields
Field Name | Description |
---|---|
node - StoreUser!
|
The item at the end of the edge. |
cursor - String!
|
A cursor for use in pagination. |
Example
{
"node": StoreUser,
"cursor": "abc123"
}
StoreUserStatus
Description
The status of the user on the store.
Values
Enum Value | Description |
---|---|
|
The user is active. |
|
The user is inactive. |
Example
"ACTIVE"
String
Description
The String
scalar type represents textual data, represented as UTF-8 character sequences. The String type is most often used by GraphQL to represent free-form human-readable text.
Example
"xyz789"
System
Description
System settings.
Fields
Field Name | Description |
---|---|
time - Long!
|
The current time. |
Example
{"time": {}}
User
Description
A user belonging to an account.
Example
{
"id": 4,
"email": "abc123",
"firstName": "abc123",
"lastName": "abc123",
"locale": "abc123"
}
UserConnection
Description
A connection to a list of items.
Fields
Field Name | Description |
---|---|
pageInfo - PageInfo!
|
Information to aid in pagination. |
edges - [UserEdge]
|
A list of edges. |
Example
{
"pageInfo": PageInfo,
"edges": [UserEdge]
}
UserEdge
UserIdentifierInput
UserMutations
Description
User mutations.
Fields
Field Name | Description |
---|---|
addUserToStore - AddUserToStoreResult
|
Adds a user to a store. |
Arguments
|
|
createUserWithPassword - CreateUserWithPasswordResult
|
Creates a user with password. |
Arguments
|
|
removeUserFromStore - RemoveUserFromStoreResult
|
Removes user from a store. |
Arguments
|
Example
{
"addUserToStore": AddUserToStoreResult,
"createUserWithPassword": CreateUserWithPasswordResult,
"removeUserFromStore": RemoveUserFromStoreResult
}