Hide menu

Hands-On for the tutorial "An Introduction To GraphQL"

Half-day Tutorial at ISWC 2019, October 27, 2019

Presented by Olaf Hartig (Linköping University) and Ruben Taelman (Ghent University -- imec)

Instructions

The artsy.net art collection and discovery platform has a public GraphQL interface. Find the user front-end of this interface at https://metaphysics-production.artsy.net/ and write GraphQL queries for the following questions.



Nested Fields

  • List the name and the nationality of all artists.
    Solution:
  • {
      artists {
        name
        nationality
      }
    }
  • For each artist, list the name and the nationality of all artists who have collaborated on their artworks.


Arguments

  • List the titles of all articles, sorted by publication time in ascending order.


Pagination

  • Instead of listing the names of all artists, list the names of only a subset of the artists by using the pagination feature supported by the interface. In particular, list the names of the artists in the second page for pages of size three.


Introspection

  • List the name and the description of every type in the GraphQL schema.
  • Extend the previous list to also see what kind of type each listed type is.
  • For all directives supported by the GraphQL schema, list their name and description, as well as their arguments and the default value of each of these arguments.


Complex

  • Do a search based on the string "Gogh" and for the first 10 hits, list the displayLabel and the description.



Page responsible: Olaf Hartig
Last updated: 2019-10-26