GraphQL Account API Reference

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.

Response

Returns a Node

Arguments
Name Description
id - ID! The ID of the object.

Example

Query
query node($id: ID!) {
  node(id: $id) {
    id
  }
}
Variables
{"id": "4"}
Response
{"data": {"node": {"id": 4}}}

nodes

Description

Fetches objects given their IDs.

Response

Returns [Node]!

Arguments
Name Description
ids - [ID!]! The IDs of the objects.

Example

Query
query nodes($ids: [ID!]!) {
  nodes(ids: $ids) {
    id
  }
}
Variables
{"ids": [4]}
Response
{"data": {"nodes": [{"id": 4}]}}

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
    }
  }
}

app

Description

App mutations.

Response

Returns an AppMutations!

Example

Query
mutation app {
  app {
    createEventSource {
      ...CreateEventSourceResultFragment
    }
    deleteEventSource {
      ...DeleteEventSourceResultFragment
    }
  }
}
Response
{
  "data": {
    "app": {
      "createEventSource": CreateEventSourceResult,
      "deleteEventSource": DeleteEventSourceResult
    }
  }
}

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.
Arguments
before - String
after - String
first - Int
last - Int
id - ID! The ID of the object.
stores - StoreConnection! The stores related to an account.
Arguments
before - String
after - String
first - Int
last - Int
users - UserConnection! Users belonging to the account.
Arguments
before - String
after - String
first - Int
last - Int
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": "abc123"}

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": "abc123"}

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

Description

An application.

Fields
Field Name Description
id - ID! The ID of the object.
name - String! The app name.
eventSources - AwsEventSourcesConnection! Amazon EventSources.
Arguments
before - String
after - String
first - Int
last - Int
Example
{
  "id": 4,
  "name": "xyz789",
  "eventSources": AwsEventSourcesConnection
}

AppMutations

Description

App mutations.

Fields
Field Name Description
createEventSource - CreateEventSourceResult Creates an Amazon EventSource.
Arguments
deleteEventSource - DeleteEventSourceResult Deletes an Amazon EventSource.
Arguments
Example
{
  "createEventSource": CreateEventSourceResult,
  "deleteEventSource": DeleteEventSourceResult
}

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

Description

An edge in a connection.

Fields
Field Name Description
node - App! The item at the end of the edge.
cursor - String! A cursor for use in pagination.
Example
{
  "node": App,
  "cursor": "abc123"
}

AwsEventSource

Description

An Amazon EventSource.

Fields
Field Name Description
id - ID! The ID of an object.
awsAccount - String! An Amazon EventSource account ID.
eventSourceName - String! An event source name.
eventSourceRegion - AwsRegion! The region of an event source.
arn - String! An Amazon EventSource resource name.
webhooksCount - Long! Number of webhooks attached to an Amazon EventSource.
Example
{
  "id": "4",
  "awsAccount": "xyz789",
  "eventSourceName": "abc123",
  "eventSourceRegion": "AF_SOUTH_1",
  "arn": "xyz789",
  "webhooksCount": {}
}

AwsEventSourcesConnection

Description

A connection to a list of items.

Fields
Field Name Description
pageInfo - PageInfo! Information to aid in pagination.
edges - [AwsEventSourcesEdge] A list of edges.
Example
{
  "pageInfo": PageInfo,
  "edges": [AwsEventSourcesEdge]
}

AwsEventSourcesEdge

Description

An edge in a connection.

Fields
Field Name Description
node - AwsEventSource! The item at the end of the edge.
cursor - String! A cursor for use in pagination.
Example
{
  "node": AwsEventSource,
  "cursor": "abc123"
}

AwsRegion

Description

The Amazon EventSource region.

Values
Enum Value Description

AF_SOUTH_1

af-south-1

AP_EAST_1

ap-east-1

AP_NORTHEAST_1

ap-northeast-1

AP_NORTHEAST_2

ap-northeast-2

AP_NORTHEAST_3

ap-northeast-3

AP_SOUTHEAST_1

ap-southeast-1

AP_SOUTHEAST_2

ap-southeast-2

AP_SOUTHEAST_3

ap-southeast-3

AP_SOUTHEAST_4

ap-southeast-4

AP_SOUTH_1

ap-south-1

AP_SOUTH_2

ap-south-2

CA_CENTRAL_1

ca-central-1

EU_CENTRAL_1

eu-central-1

EU_CENTRAL_2

eu-central-2

EU_NORTH_1

eu-north-1

EU_SOUTH_1

eu-south-1

EU_SOUTH_2

eu-south-2

EU_WEST_1

eu-west-1

EU_WEST_2

eu-west-2

EU_WEST_3

eu-west-3

IL_CENTRAL_1

il-central-1

ME_CENTRAL_1

me-central-1

SA_EAST_1

sa-east-1

US_EAST_1

us-east-1

US_EAST_2

us-east-2

US_WEST_1

us-west-1

US_WEST_2

us-west-2
Example
"AF_SOUTH_1"

Boolean

Description

The Boolean scalar type represents true or false.

CollectionInfo

Description

Collection details.

Fields
Field Name Description
totalItems - Long The total number of items in the collection.
Example
{"totalItems": {}}

CreateEventSourceInput

Fields
Input Field Description
appId - ID! The ID of an app.
awsAccount - String! An Amazon EventSource account ID.
eventSourceName - String! An event source name.
eventSourceRegion - AwsRegion! The region of an event source.
Example
{
  "appId": "4",
  "awsAccount": "abc123",
  "eventSourceName": "abc123",
  "eventSourceRegion": "AF_SOUTH_1"
}

CreateEventSourceResult

Fields
Field Name Description
eventSource - AwsEventSource The Amazon EventSource created as a result of mutation.
Example
{"eventSource": AwsEventSource}

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": "abc123",
  "lastName": "xyz789",
  "locale": "abc123",
  "password": "xyz789",
  "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"

DeleteEventSourceInput

Fields
Input Field Description
appId - ID! The ID of an app.
id - ID! The ID of the object.
Example
{
  "appId": "4",
  "id": "4"
}

DeleteEventSourceResult

Fields
Field Name Description
deletedEventSourceId - ID! The ID of the object.
affectedWebhooksIds - [ID!]! The IDs of affected webhooks by event source delete mutation. Their status is automatically changed to disabled.
Example
{
  "deletedEventSourceId": "4",
  "affectedWebhooksIds": ["4"]
}

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
987

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": "abc123"
}

RemoveUserFromAccountInput

Description

Input needed to remove a user from an account.

Fields
Input Field Description
email - String The email of the user to be removed from the account.
userId - ID The id of the user to be removed.
Example
{"email": "xyz789", "userId": 4}

RemoveUserFromAccountResult

Fields
Field Name Description
accountId - ID! The ID of the object.
userId - ID! The ID of the object.
Example
{
  "accountId": "4",
  "userId": "4"
}

RemoveUserFromStoreInput

Fields
Input Field Description
storeId - ID! The store from which user is to be removed.
userId - ID! The user to be removed.
Example
{"storeId": 4, "userId": 4}

RemoveUserFromStoreResult

Fields
Field Name Description
storeId - ID! The store from which the user is removed from.
user - User Removed user.
Example
{"storeId": 4, "user": User}

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.
Arguments
before - String
after - String
first - Int
last - Int
name - String! The store name for the store.
storeHash - String! The store hash for the store.
users - StoreUserConnection! Users belonging to the store.
Arguments
before - String
after - String
first - Int
last - Int
Example
{
  "id": "4",
  "apps": AppsConnection,
  "name": "abc123",
  "storeHash": "abc123",
  "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

Description

An edge in a connection.

Fields
Field Name Description
node - Store! The item at the end of the edge.
cursor - String! A cursor for use in pagination.
Example
{
  "node": Store,
  "cursor": "xyz789"
}

StoreUser

Description

A user belonging to a store.

Fields
Field Name Description
id - ID! The ID of the object.
apps - AppsConnection! Apps accessible by the user on the store.
Arguments
before - String
after - String
first - Int
last - Int
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": "abc123",
  "lastLoginAt": "2007-12-03T10:15:30Z",
  "lastName": "xyz789",
  "locale": "abc123",
  "permissions": ["xyz789"],
  "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.
collectionInfo - CollectionInfo Collection details.
Example
{
  "pageInfo": PageInfo,
  "edges": [StoreUserEdge],
  "collectionInfo": CollectionInfo
}

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": "xyz789"
}

StoreUserStatus

Description

The status of the user on the store.

Values
Enum Value Description

ACTIVE

The user is active.

INACTIVE

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
"abc123"

System

Description

System settings.

Fields
Field Name Description
time - Long! The current time.
Example
{"time": {}}

User

Description

A user belonging to an account.

Fields
Field Name Description
id - ID! The ID of the object.
email - String! The email for the user.
firstName - String! First name.
lastName - String! Last name.
locale - String! User preferred locale.
Example
{
  "id": "4",
  "email": "xyz789",
  "firstName": "abc123",
  "lastName": "xyz789",
  "locale": "xyz789"
}

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

Description

An edge in a connection.

Fields
Field Name Description
node - User! The item at the end of the edge.
cursor - String! A cursor for use in pagination.
Example
{
  "node": User,
  "cursor": "abc123"
}

UserIdentifierInput

Description

The user to add to the store.

Fields
Input Field Description
email - String The email of the user to be added to the store.
id - ID The ID of the user to be added.
Example
{"email": "xyz789", "id": 4}

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
}