There are many styles and formats for applicationApplication (Computer Science) A computer software unit that provides functionality for particular use programming interfaces (APIs). The Cooper Hewitt APIAPI (Computer Science) Application Programming Interface – a facility to allow a computer or application to access the data and/or functionality of another computer system or application uses GraphQLGraphQL (Computer Science) GraphQL is an open-source data query and manipulation language for APIs, a flexible, fast and powerful “queryQuery (Computer Science) A query is a request for data or information from a database table or combination of tables, or an API that manages access to those tables language” used to define and work with APIs. You can find out more about GraphQL on their foundation’s website.
GraphQL queries follow this basic structure:
{
objectObject (Museology) Artefact or specimen held in a museum collection.
(Computer science) A software "bundle" consisting of a set of variables which define the states the object can exist in and a set of functions that define its behavior. (argumentsArguments (Computer Science) Individual elements of information contained within a query, often structured as name / value pairs, e.g. title="chair") {
fieldsFields (Computer Science) The smallest container of information in a database. A field is named, e.g. "Title" or "Date" and each record contains a group of fields.
}
}
Once the query is sent to the API endpoint, the data that is returned follows the same structure as the query:
{
“data”: {
“object”: {
“field”: valueValue (Computer Science) The representation given to the corresponding entity, often the public description of the entity.
}
}
}