GraphQL items queries

Items on Check can be a text, link, image or video.

Log details of items that are displayed on timeline

  • Query

query me { project_media(ids: "43") { title log(last: 3) { edges { node { event_type object_changes_json task { label } created_at } } } } }

  • Result
{
  "data": {
    "project_media": {
      "title": "'My Neighbor Totoro' releases in China after 30 years",
      "log": {
        "edges": [
          {
            "node": {
              "event_type": "update_dynamicannotationfield",
              "object_changes_json": "{\"value\":[\"--- undetermined\\n\",\"--- in_progress\\n\"]}",
              "task": null,
              "created_at": "1587347294"
            }
          },
          {
            "node": {
              "event_type": "update_task",
              "object_changes_json": "{\"data\":[{\"label\":\"What's the name of the movie?\",\"type\":\"free_text\",\"options\":[],\"description\":\"Tell us\",\"required\":true,\"json_schema\":null,\"slug\":\"what_s_the_name_of_the_movie\"},{\"label\":\"What's the name of the movie?\",\"type\":\"free_text\",\"options\":[],\"description\":\"Tell us\",\"required\":true,\"json_schema\":null,\"slug\":\"what_s_the_name_of_the_movie\",\"log_count\":1}]}",
              "task": null,
              "created_at": "1587347316"
            }
          },
          {
            "node": {
              "event_type": "create_comment",
              "object_changes_json": "{\"data\":[null,{\"text\":\"Nice movie!\"}],\"annotated_id\":[null,43],\"annotated_type\":[null,\"ProjectMedia\"],\"annotation_type\":[null,\"comment\"],\"annotator_type\":[null,\"User\"],\"annotator_id\":[null,4]}",
              "task": null,
              "created_at": "1587347339"
            }
          }
        ]
      }
    }
  }
}

Create a Link item

  • Query

mutation create { createProjectMedia(input: {project_id: <project id>, url: "<url>", clientMutationId: "1"}) { project_media { title } } }

Example:

mutation create { 
  createProjectMedia(input: {project_id: 9, url: "https://twitter.com/chrisflach/status/1265204660392079360", clientMutationId: "1"}) {
    project_media {
      title
    } 
  } 
}
  • Result
{
  "data": {
    "createProjectMedia": {
      "project_media": {
        "title": "Experts https://t.co/WRZzD5CC0j https://t.co/cGfvPzM7GI"
      }
    }
  }
}

Create a Claim item

  • Query

mutation create { createProjectMedia(input: {project_id: <project id>, quote: "<text>", clientMutationId: "1"}) { project_media { title } } }

Example:

mutation create { 
  createProjectMedia(input: {project_id: 9, quote: "Is this a true message?", clientMutationId: "1"}) {
    project_media {
      title
    } 
  } 
}
  • Result
{
  "data": {
    "createProjectMedia": {
      "project_media": {
        "title": "Is this a true message?"
      }
    }
  }
}