Page MenuHomePhabricator

Create API reference page with code samples
Open, Needs TriagePublic

Description

Create a new page using the following structure and reusing as much content as possible from: https://www.wikidata.org/wiki/Wikidata:Wikibase_GraphQL to describe the features in detail and give code examples.

Wording for titles below is not set in stone, please consider which titles are clearest and best for skimming quickly to find the relevant information.

Types of queries

Search

  • Query syntax
  • Pagination

Single item look ups

  • Look up by QID
  • Look up by External ID
  • Look up by sitelink

Retrieve data for multiple items

Features and syntax applicable for all query types

Retrieving labels of linked entities

Value types

Table with columns: value type, description, example, notes

Constructing queries

  • Multiple top level fields at once
  • Multiple fields via GraphQL aliases
  • (Discuss with devs: what else goes here)

Common error responses

  • Query complexity limit
  • etc

Language options

  • Multilingual queries
  • Language fallbacks

Related Objects

StatusSubtypeAssignedTask
OpenNone
OpenNone

Event Timeline

code examples integrated into the documentation page with try it out links to GraphiQL and an additional overall link to a PAWS notebook with many more examples to try out.

Additionally, create another task to have a production ready PAWS notebook that can be linked from this page