Cap Collectif Developers - GraphQL API

Look up consultations

Interactive section

The following query looks up the "3. Comment doit fonctionner le revenu universel d'activité" consultation, finds the first 10 versions, arguments, opinions, sources and returns each contribution's title or body :

{
  node(id: "Q29uc3VsdGF0aW9uOjk3Mzc0ODgxLWRmNzEtMTFlOS1iMWFjLTAyNDJhYzExMDAwMw==") {
    ... on Consultation {
      contributions(first: 10) {
        totalCount
        edges {
          node {
            __typename
            ...on Version {
              id
              title
            }
            ...on Argument {
              id
              body
            }
            ...on Source {
              id
              title
            }
            ...on Opinion {
              id
              title
            }
          }
        }
      }
    }
  }
}