Cafe GraphQL API Reference

SpectaQLで定義ファイルから自動生成しています

API Endpoints
http://localhost:9001/graphql
Headers
Authorization: Basic Auth

Queries

castCatSearch

Description

[キャスト(猫)]-[取得]

Response

Returns [CastCat]!

Arguments
Name Description
codes - [ID]! CastCatCode

Example

Query
query castCatSearch($codes: [ID]!) {
  castCatSearch(codes: $codes) {
    code
    name
    image
    type
    sex
    birthdayDate
    favorite
    dislike
    prohibition
    brothers
    sisters
    memo
    version
  }
}
Variables
{"codes": [4]}
Response
{
  "data": {
    "castCatSearch": [
      {
        "code": "4",
        "name": "xyz789",
        "image": "xyz789",
        "type": "abc123",
        "sex": "unknown",
        "birthdayDate": "2007-12-03",
        "favorite": "abc123",
        "dislike": "abc123",
        "prohibition": "abc123",
        "brothers": [4],
        "sisters": [4],
        "memo": "abc123",
        "version": 987
      }
    ]
  }
}

castSearch

Description

[キャスト]-[取得]

Response

Returns [Cast]!

Arguments
Name Description
codes - [ID]! CastCode
locationCodes - [ID]! LocationCode

Example

Query
query castSearch(
  $codes: [ID]!,
  $locationCodes: [ID]!
) {
  castSearch(
    codes: $codes,
    locationCodes: $locationCodes
  ) {
    code
    location {
      ...LocationFragment
    }
    castCat {
      ...CastCatFragment
    }
    employmentStatus
    firstAttendanceDate
    lastAttendanceDate
    memo
    version
  }
}
Variables
{"codes": [4], "locationCodes": ["4"]}
Response
{
  "data": {
    "castSearch": [
      {
        "code": "4",
        "location": Location,
        "castCat": CastCat,
        "employmentStatus": "main",
        "firstAttendanceDate": "2007-12-03",
        "lastAttendanceDate": "2007-12-03",
        "memo": "abc123",
        "version": 123
      }
    ]
  }
}

locationSearch

Description

[所在地/店舗]-[取得]

Response

Returns [Location]!

Arguments
Name Description
codes - [ID]! LocationCode

Example

Query
query locationSearch($codes: [ID]!) {
  locationSearch(codes: $codes) {
    code
    name
    contact {
      ...LocationContactFragment
    }
    address {
      ...LocationAddressFragment
    }
    openDate
    closeDate
    hours {
      ...LocationHoursFragment
    }
    memo
    version
  }
}
Variables
{"codes": [4]}
Response
{
  "data": {
    "locationSearch": [
      {
        "code": "4",
        "name": "abc123",
        "contact": LocationContact,
        "address": LocationAddress,
        "openDate": "2007-12-03",
        "closeDate": "2007-12-03",
        "hours": LocationHours,
        "memo": "abc123",
        "version": 123
      }
    ]
  }
}

noticeSearch

Description

[お知らせ]-[取得]

Response

Returns [Notice]!

Arguments
Name Description
codes - [ID]! NoticeCode
locationCodes - [ID]! LocationCode

Example

Query
query noticeSearch(
  $codes: [ID]!,
  $locationCodes: [ID]!
) {
  noticeSearch(
    codes: $codes,
    locationCodes: $locationCodes
  ) {
    code
    location {
      ...LocationFragment
    }
    summary
    detail
    publicationStartDateTime
    publicationEndDateTime
    version
  }
}
Variables
{
  "codes": ["4"],
  "locationCodes": ["4"]
}
Response
{
  "data": {
    "noticeSearch": [
      {
        "code": "4",
        "location": Location,
        "summary": "xyz789",
        "detail": "xyz789",
        "publicationStartDateTime": "2007-12-03T10:15:30Z",
        "publicationEndDateTime": "2007-12-03T10:15:30Z",
        "version": 987
      }
    ]
  }
}

Mutations

authenticationUserCreate

Description

[認証ユーザー]-[登録]

Response

Returns an AuthenticationUser

Arguments
Name Description
input - AuthenticationUserCommand! [認証ユーザー]-[登録/更新]

Example

Query
mutation authenticationUserCreate($input: AuthenticationUserCommand!) {
  authenticationUserCreate(input: $input) {
    code
    username
    memo
    version
  }
}
Variables
{"input": AuthenticationUserCommand}
Response
{
  "data": {
    "authenticationUserCreate": {
      "code": "4",
      "username": "xyz789",
      "memo": "xyz789",
      "version": 987
    }
  }
}

castCatCreate

Description

[キャスト(猫)]-[登録]

Response

Returns a CastCat

Arguments
Name Description
input - CastCatCommand! [キャスト(猫)]-[登録/更新]

Example

Query
mutation castCatCreate($input: CastCatCommand!) {
  castCatCreate(input: $input) {
    code
    name
    image
    type
    sex
    birthdayDate
    favorite
    dislike
    prohibition
    brothers
    sisters
    memo
    version
  }
}
Variables
{"input": CastCatCommand}
Response
{
  "data": {
    "castCatCreate": {
      "code": "4",
      "name": "xyz789",
      "image": "xyz789",
      "type": "xyz789",
      "sex": "unknown",
      "birthdayDate": "2007-12-03",
      "favorite": "xyz789",
      "dislike": "xyz789",
      "prohibition": "xyz789",
      "brothers": ["4"],
      "sisters": [4],
      "memo": "abc123",
      "version": 123
    }
  }
}

castCatDelete

Description

[キャスト(猫)]-[削除]

Response

Returns an ID

Arguments
Name Description
code - ID! CastCatCode
version - Int! バージョンフィールド

Example

Query
mutation castCatDelete(
  $code: ID!,
  $version: Int!
) {
  castCatDelete(
    code: $code,
    version: $version
  )
}
Variables
{"code": 4, "version": 987}
Response
{"data": {"castCatDelete": "4"}}

castCatUpdate

Description

[キャスト(猫)]-[更新]

Response

Returns a CastCat

Arguments
Name Description
code - ID! CastCatCode
input - CastCatCommand! [キャスト(猫)]-[登録/更新]
version - Int! バージョンフィールド

Example

Query
mutation castCatUpdate(
  $code: ID!,
  $input: CastCatCommand!,
  $version: Int!
) {
  castCatUpdate(
    code: $code,
    input: $input,
    version: $version
  ) {
    code
    name
    image
    type
    sex
    birthdayDate
    favorite
    dislike
    prohibition
    brothers
    sisters
    memo
    version
  }
}
Variables
{
  "code": "4",
  "input": CastCatCommand,
  "version": 123
}
Response
{
  "data": {
    "castCatUpdate": {
      "code": "4",
      "name": "abc123",
      "image": "xyz789",
      "type": "xyz789",
      "sex": "unknown",
      "birthdayDate": "2007-12-03",
      "favorite": "xyz789",
      "dislike": "abc123",
      "prohibition": "abc123",
      "brothers": [4],
      "sisters": [4],
      "memo": "abc123",
      "version": 987
    }
  }
}

castCreate

Description

[キャスト]-[登録]

Response

Returns a Cast

Arguments
Name Description
input - CastCommand! [キャスト]-[登録/更新]

Example

Query
mutation castCreate($input: CastCommand!) {
  castCreate(input: $input) {
    code
    location {
      ...LocationFragment
    }
    castCat {
      ...CastCatFragment
    }
    employmentStatus
    firstAttendanceDate
    lastAttendanceDate
    memo
    version
  }
}
Variables
{"input": CastCommand}
Response
{
  "data": {
    "castCreate": {
      "code": "4",
      "location": Location,
      "castCat": CastCat,
      "employmentStatus": "main",
      "firstAttendanceDate": "2007-12-03",
      "lastAttendanceDate": "2007-12-03",
      "memo": "abc123",
      "version": 123
    }
  }
}

castDelete

Description

[キャスト]-[削除]

Response

Returns an ID

Arguments
Name Description
code - ID! CastCode
version - Int! バージョンフィールド

Example

Query
mutation castDelete(
  $code: ID!,
  $version: Int!
) {
  castDelete(
    code: $code,
    version: $version
  )
}
Variables
{"code": "4", "version": 123}
Response
{"data": {"castDelete": 4}}

castUpdate

Description

[キャスト]-[更新]

Response

Returns a Cast

Arguments
Name Description
code - ID! CastCode
input - CastCommand! [キャスト]-[登録/更新]
version - Int! バージョンフィールド

Example

Query
mutation castUpdate(
  $code: ID!,
  $input: CastCommand!,
  $version: Int!
) {
  castUpdate(
    code: $code,
    input: $input,
    version: $version
  ) {
    code
    location {
      ...LocationFragment
    }
    castCat {
      ...CastCatFragment
    }
    employmentStatus
    firstAttendanceDate
    lastAttendanceDate
    memo
    version
  }
}
Variables
{
  "code": "4",
  "input": CastCommand,
  "version": 987
}
Response
{
  "data": {
    "castUpdate": {
      "code": "4",
      "location": Location,
      "castCat": CastCat,
      "employmentStatus": "main",
      "firstAttendanceDate": "2007-12-03",
      "lastAttendanceDate": "2007-12-03",
      "memo": "abc123",
      "version": 123
    }
  }
}

locationCreate

Description

[所在地/店舗]-[登録]

Response

Returns a Location

Arguments
Name Description
input - LocationCommand! [所在地/店舗]-[登録/更新]

Example

Query
mutation locationCreate($input: LocationCommand!) {
  locationCreate(input: $input) {
    code
    name
    contact {
      ...LocationContactFragment
    }
    address {
      ...LocationAddressFragment
    }
    openDate
    closeDate
    hours {
      ...LocationHoursFragment
    }
    memo
    version
  }
}
Variables
{"input": LocationCommand}
Response
{
  "data": {
    "locationCreate": {
      "code": "4",
      "name": "xyz789",
      "contact": LocationContact,
      "address": LocationAddress,
      "openDate": "2007-12-03",
      "closeDate": "2007-12-03",
      "hours": LocationHours,
      "memo": "xyz789",
      "version": 123
    }
  }
}

locationDelete

Description

[所在地/店舗]-[削除]

Response

Returns an ID

Arguments
Name Description
code - ID! LocationCode
version - Int! バージョンフィールド

Example

Query
mutation locationDelete(
  $code: ID!,
  $version: Int!
) {
  locationDelete(
    code: $code,
    version: $version
  )
}
Variables
{"code": 4, "version": 123}
Response
{"data": {"locationDelete": 4}}

locationUpdate

Description

[所在地/店舗]-[更新]

Response

Returns a Location

Arguments
Name Description
code - ID! LocationCode
input - LocationCommand! [所在地/店舗]-[登録/更新]
version - Int! バージョンフィールド

Example

Query
mutation locationUpdate(
  $code: ID!,
  $input: LocationCommand!,
  $version: Int!
) {
  locationUpdate(
    code: $code,
    input: $input,
    version: $version
  ) {
    code
    name
    contact {
      ...LocationContactFragment
    }
    address {
      ...LocationAddressFragment
    }
    openDate
    closeDate
    hours {
      ...LocationHoursFragment
    }
    memo
    version
  }
}
Variables
{
  "code": "4",
  "input": LocationCommand,
  "version": 123
}
Response
{
  "data": {
    "locationUpdate": {
      "code": 4,
      "name": "abc123",
      "contact": LocationContact,
      "address": LocationAddress,
      "openDate": "2007-12-03",
      "closeDate": "2007-12-03",
      "hours": LocationHours,
      "memo": "abc123",
      "version": 987
    }
  }
}

noticeCreate

Description

[お知らせ]-[登録]

Response

Returns a Notice

Arguments
Name Description
input - NoticeCommand! [お知らせ]-[登録/更新]

Example

Query
mutation noticeCreate($input: NoticeCommand!) {
  noticeCreate(input: $input) {
    code
    location {
      ...LocationFragment
    }
    summary
    detail
    publicationStartDateTime
    publicationEndDateTime
    version
  }
}
Variables
{"input": NoticeCommand}
Response
{
  "data": {
    "noticeCreate": {
      "code": "4",
      "location": Location,
      "summary": "xyz789",
      "detail": "xyz789",
      "publicationStartDateTime": "2007-12-03T10:15:30Z",
      "publicationEndDateTime": "2007-12-03T10:15:30Z",
      "version": 123
    }
  }
}

noticeDelete

Description

[お知らせ]-[削除]
お知らせを削除します。

Response

Returns an ID

Arguments
Name Description
code - ID! NoticeCode
version - Int! バージョンフィールド

Example

Query
mutation noticeDelete(
  $code: ID!,
  $version: Int!
) {
  noticeDelete(
    code: $code,
    version: $version
  )
}
Variables
{"code": 4, "version": 987}
Response
{"data": {"noticeDelete": "4"}}

noticeUpdate

Description

[お知らせ]-[更新]
お知らせを更新します。

Response

Returns a Notice

Arguments
Name Description
code - ID! NoticeCode
input - NoticeCommand! [お知らせ]-[登録/更新]
version - Int! バージョンフィールド

Example

Query
mutation noticeUpdate(
  $code: ID!,
  $input: NoticeCommand!,
  $version: Int!
) {
  noticeUpdate(
    code: $code,
    input: $input,
    version: $version
  ) {
    code
    location {
      ...LocationFragment
    }
    summary
    detail
    publicationStartDateTime
    publicationEndDateTime
    version
  }
}
Variables
{
  "code": "4",
  "input": NoticeCommand,
  "version": 123
}
Response
{
  "data": {
    "noticeUpdate": {
      "code": 4,
      "location": Location,
      "summary": "abc123",
      "detail": "xyz789",
      "publicationStartDateTime": "2007-12-03T10:15:30Z",
      "publicationEndDateTime": "2007-12-03T10:15:30Z",
      "version": 123
    }
  }
}

Types

AuthenticationUser

Description

[認証ユーザー]-[詳細]

Fields
Field Name Description
code - ID! UserCode
username - String! Username
memo - String ユーザーメモ
version - Int! バージョンフィールド
Example
{
  "code": 4,
  "username": "abc123",
  "memo": "xyz789",
  "version": 987
}

AuthenticationUserCommand

Description

[認証ユーザー]-[登録/更新]

Fields
Input Field Description
username - String!

Username

password - String!

Password

roleKeys - [String]

RoleKey

memo - String

ユーザーメモ

Example
{
  "username": "abc123",
  "password": "abc123",
  "roleKeys": ["xyz789"],
  "memo": "abc123"
}

Boolean

Description

The Boolean scalar type represents true or false.

Example
true

Cast

Description

[キャスト]-[詳細]

Fields
Field Name Description
code - ID! CastCode
location - Location! [所在地/店舗]-[詳細]
castCat - CastCat! [キャスト(猫)]-[詳細]
employmentStatus - EmploymentStatus! 雇用形態
firstAttendanceDate - Date 初出勤日
lastAttendanceDate - Date 最終出勤日
memo - String 店舗メモ
version - Int! バージョンフィールド
Example
{
  "code": "4",
  "location": Location,
  "castCat": CastCat,
  "employmentStatus": "main",
  "firstAttendanceDate": "2007-12-03",
  "lastAttendanceDate": "2007-12-03",
  "memo": "abc123",
  "version": 987
}

CastCat

Description

[キャスト(猫)]-[詳細]

Fields
Field Name Description
code - ID! CastCatCode
name - String! 名前
image - String 画像
type - String 種類
sex - CatSex! キャスト(猫)性別
birthdayDate - Date 誕生日
favorite - String 好きなこと
dislike - String 嫌いなこと
prohibition - String 禁止事項
brothers - [ID] 兄弟
sisters - [ID] 姉妹
memo - String キャストメモ
version - Int! バージョンフィールド
Example
{
  "code": 4,
  "name": "xyz789",
  "image": "xyz789",
  "type": "xyz789",
  "sex": "unknown",
  "birthdayDate": "2007-12-03",
  "favorite": "abc123",
  "dislike": "abc123",
  "prohibition": "xyz789",
  "brothers": ["4"],
  "sisters": [4],
  "memo": "xyz789",
  "version": 123
}

CastCatCommand

Description

[キャスト(猫)]-[登録/更新]

Fields
Input Field Description
name - String!

名前

image - String

画像

type - String

種類

sex - CatSex!

キャスト(猫)性別

birthdayDate - Date

誕生日

favorite - String

好きなこと

dislike - String

嫌いなこと

prohibition - String

禁止事項

brothers - [ID]

兄弟

sisters - [ID]

姉妹

memo - String

キャストメモ

Example
{
  "name": "xyz789",
  "image": "abc123",
  "type": "abc123",
  "sex": "unknown",
  "birthdayDate": "2007-12-03",
  "favorite": "xyz789",
  "dislike": "abc123",
  "prohibition": "abc123",
  "brothers": [4],
  "sisters": [4],
  "memo": "xyz789"
}

CastCommand

Description

[キャスト]-[登録/更新]

Fields
Input Field Description
locationCode - ID!

LocationCode

castCatCode - ID!

CastCatCode

employmentStatus - EmploymentStatus!

雇用形態

firstAttendanceDate - Date

初出勤日

lastAttendanceDate - Date

最終出勤日

memo - String

店舗メモ

Example
{
  "locationCode": 4,
  "castCatCode": 4,
  "employmentStatus": "main",
  "firstAttendanceDate": "2007-12-03",
  "lastAttendanceDate": "2007-12-03",
  "memo": "abc123"
}

CatSex

Description

キャスト(猫)性別

Values
Enum Value Description

unknown

不明

male

雄(♂)

female

雌(♀)
Example
"unknown"

Date

Description

日付

Example
"2007-12-03"

DateTime

Description

日時

Example
"2007-12-03T10:15:30Z"

EmploymentStatus

Description

雇用形態

Values
Enum Value Description

main

sub

Example
"main"

HasCommon

Description

モデルはこのインターフェースを実装しています。

Fields
Field Name Description
code - ID! コードは一意の値になります。
version - Int! バージョンフィールドは更新/削除の楽観排他用に使用します。
Possible Types
HasCommon Types

AuthenticationUser

Cast

CastCat

Location

Notice

Example
{"code": "4", "version": 123}

ID

Description

The ID scalar type represents a unique identifier, often used to refetch an object or as key for a cache. The ID type appears in a JSON response as a String; however, it is not intended to be human-readable. When expected as an input type, any string (such as "4") or integer (such as 4) input value will be accepted as an ID.

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

Location

Description

[所在地/店舗]-[詳細]

Fields
Field Name Description
code - ID! LocationCode
name - String! 店舗名
contact - LocationContact! [所在地/店舗]-[店舗連絡先]-[詳細]
address - LocationAddress! [所在地/店舗]-[店舗住所]-[詳細]
openDate - Date 店舗開店日
closeDate - Date 店舗閉店日
hours - LocationHours! [所在地/店舗]-[店舗営業時間]-[詳細]
memo - String 店舗メモ
version - Int! バージョンフィールド
Example
{
  "code": 4,
  "name": "abc123",
  "contact": LocationContact,
  "address": LocationAddress,
  "openDate": "2007-12-03",
  "closeDate": "2007-12-03",
  "hours": LocationHours,
  "memo": "xyz789",
  "version": 987
}

LocationAddress

Description

[所在地/店舗]-[店舗住所]-[詳細]

Fields
Field Name Description
postalCode - String 店舗住所(郵便番号)
prefectureCode - Int 店舗住所(都道府県コード)
prefectureLabel - String 店舗住所(都道府県)
address1 - String 店舗住所(都道府県)
address2 - String 店舗住所(市区町村)
address3 - String 店舗住所(町域)
streetAddress - String 店舗住所(番地)
buildingName - String 店舗住所(建物名)
supplement - String 店舗住所(補足)
Example
{
  "postalCode": "abc123",
  "prefectureCode": 987,
  "prefectureLabel": "abc123",
  "address1": "xyz789",
  "address2": "abc123",
  "address3": "abc123",
  "streetAddress": "abc123",
  "buildingName": "xyz789",
  "supplement": "xyz789"
}

LocationAddressCommand

Description

[所在地/店舗]-[店舗住所]-[登録/更新]

Fields
Input Field Description
postalCode - String

店舗住所(郵便番号)

prefectureCode - Int

店舗住所(都道府県コード)

address1 - String

店舗住所(都道府県)

address2 - String

店舗住所(市区町村)

address3 - String

店舗住所(町域)

streetAddress - String

店舗住所(番地)

buildingName - String

店舗住所(建物名)

supplement - String

店舗住所(補足)

Example
{
  "postalCode": "abc123",
  "prefectureCode": 987,
  "address1": "abc123",
  "address2": "abc123",
  "address3": "xyz789",
  "streetAddress": "abc123",
  "buildingName": "xyz789",
  "supplement": "xyz789"
}

LocationCommand

Description

[所在地/店舗]-[登録/更新]

Fields
Input Field Description
name - String!

店舗名

contact - LocationContactCommand!

[所在地/店舗]-[店舗連絡先]-[登録/更新]

address - LocationAddressCommand!

[所在地/店舗]-[店舗住所]-[登録/更新]

openDate - Date

店舗開店日

closeDate - Date

店舗閉店日

hours - LocationHoursCommand!

[所在地/店舗]-[店舗営業時間]-[登録/更新]

memo - String

店舗メモ

Example
{
  "name": "abc123",
  "contact": LocationContactCommand,
  "address": LocationAddressCommand,
  "openDate": "2007-12-03",
  "closeDate": "2007-12-03",
  "hours": LocationHoursCommand,
  "memo": "abc123"
}

LocationContact

Description

[所在地/店舗]-[店舗連絡先]-[詳細]

Fields
Field Name Description
phoneNumber - String 店舗連絡先(電話番号)
mailAddress - String 店舗連絡先(メールアドレス)
Example
{
  "phoneNumber": "xyz789",
  "mailAddress": "xyz789"
}

LocationContactCommand

Description

[所在地/店舗]-[店舗連絡先]-[登録/更新]

Fields
Input Field Description
phoneNumber - String

店舗連絡先(電話番号)

mailAddress - String

店舗連絡先(メールアドレス)

Example
{
  "phoneNumber": "xyz789",
  "mailAddress": "abc123"
}

LocationHours

Description

[所在地/店舗]-[店舗営業時間]-[詳細]

Fields
Field Name Description
openingTime - DateTime 店舗営業時間(開店時間)
closingTime - DateTime 店舗営業時間(閉店時間)
supplement - String 店舗営業時間(補足)
Example
{
  "openingTime": "2007-12-03T10:15:30Z",
  "closingTime": "2007-12-03T10:15:30Z",
  "supplement": "abc123"
}

LocationHoursCommand

Description

[所在地/店舗]-[店舗営業時間]-[登録/更新]

Fields
Input Field Description
openingTime - DateTime

店舗営業時間(開店時間)

closingTime - DateTime

店舗営業時間(閉店時間)

supplement - String

店舗営業時間(補足)

Example
{
  "openingTime": "2007-12-03T10:15:30Z",
  "closingTime": "2007-12-03T10:15:30Z",
  "supplement": "xyz789"
}

Notice

Description

[お知らせ]-[詳細]

Fields
Field Name Description
code - ID! NoticeCode
location - Location [所在地/店舗]-[詳細]
summary - String! お知らせ概要
detail - String お知らせ詳細
publicationStartDateTime - DateTime 掲載開始日時
publicationEndDateTime - DateTime 掲載終了日時
version - Int! バージョンフィールド
Example
{
  "code": 4,
  "location": Location,
  "summary": "abc123",
  "detail": "xyz789",
  "publicationStartDateTime": "2007-12-03T10:15:30Z",
  "publicationEndDateTime": "2007-12-03T10:15:30Z",
  "version": 987
}

NoticeCommand

Description

[お知らせ]-[登録/更新]

Fields
Input Field Description
locationCode - ID

LocationCode

summary - String!

お知らせ概要

detail - String

お知らせ詳細

publicationStartDateTime - DateTime

掲載開始日時

publicationEndDateTime - DateTime

掲載終了日時

Example
{
  "locationCode": 4,
  "summary": "abc123",
  "detail": "abc123",
  "publicationStartDateTime": "2007-12-03T10:15:30Z",
  "publicationEndDateTime": "2007-12-03T10:15:30Z"
}

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"