Need to manage API keys, view logs, or check usage?Open the Developer portal →

GraphQL queries

Read operations available on the public schema.

The blocks labelled Schema below are SDL — they describe types and inputs, and are not valid to send to the GraphQL endpoint. Send only the blocks labelled Query. If you copy-paste a schema block into the playground you'll get The "X" definition is not executable.
Reading masked values
Every numeric value on a property, impact, or process exchange is only present when that record has been pulledby the active team. If revealed is false the value field is null — the REST API returns the same contract. Purchase data through pullProperties (material rows) or pullImpacts (process rows) to fill in the values.

apiVersion

Echoes the API version that the request is being processed under, plus the list of supported versions.

Schema

type PublicApiVersion {
  current: String!
  supported: [String!]!
  header: String!
}

Query

query CurrentApiVersion {
  apiVersion {
    current
    supported
  }
}

me

The user account that owns the API key.

Schema

type PublicUser {
  id: ID!
  email: String
  firstname: String
  lastname: String
  recentTeam: String
}

Query

query Me {
  me {
    id
    email
    firstname
    lastname
  }
}

teams

Teams the API-key owner is an active member of. The id of any returned team is a valid value for the x-team-id header.

Schema

type PublicTeam {
  id: ID!
  label: String!
  description: String
  role: String!       # "owner" or "member"
  isRecent: Boolean!  # the user's most recently active team — usually a good default
}

type PublicTeamsPage {
  items: [PublicTeam!]!
  total: Int!
}

Query

query MyTeams {
  teams {
    items { id label role isRecent }
    total
  }
}

impactMethods

Every characterization method (e.g. IPCC 2021, ReCiPe 2016) available across the library. Process impact rows reference these methods by name.

Schema

type PublicImpactMethod {
  id: ID!
  name: String!       # method family (e.g. "IPCC 2021")
  version: String!    # specific variant (e.g. "v1.03 midpoint (H) no LT")
}

type PublicImpactMethodsPage {
  items: [PublicImpactMethod!]!
  total: Int!
}

Query

query ImpactMethods {
  impactMethods {
    items { id name version }
    total
  }
}

processes

List processes in the library. Pass input.pulled: true to restrict to processes where the active team has pulled at least one impact (or characterization method) — individual impacts[].revealed flags still apply within each process.

Schema

input PublicListInput {
  search: String
  limit: Int
  offset: Int
  pulled: Boolean
}

type PublicProcessesPage {
  items: [PublicProcess!]!
  total: Int
  hasMore: Boolean
}

type PublicProcess {
  id: ID!
  name: String
  description: String
  source: String
  sourceOrganization: String
  functionalUnit: String
  regionRegionalScope: String
  processBoundary: String
  datePublished: String
  revealed: Boolean
  favorite: Boolean
  inputs: [PublicProcessExchange!]
  outputs: [PublicProcessExchange!]
  impacts: [PublicProcessImpact!]
}

type PublicProcessExchange {
  id: ID!
  referenceId: String
  name: String
  "Numeric value (e.g. the functional unit amount). Null when not revealed."
  value: Float
  unit: String
  exchangeTypeDetails: String
}

type PublicProcessImpact {
  id: ID!
  method: String
  impactCategory: String
  indicator: String
  "Impact value. Only present when revealed is true; null otherwise."
  value: Float
  unit: String
  revealed: Boolean
  "Characterization-method ids needed to pull this impact. Pass verbatim as pullImpacts.input.characterizationFactorIds."
  characterizationFactorProcessIds: [String!]
}

Query — with variables

query SearchProcesses($input: PublicListInput) {
  processes(input: $input) {
    items { id name regionRegionalScope }
    total
    hasMore
  }
}

Variables panel:

{ "input": { "search": "injection", "limit": 10 } }

Query — owned listing with revealed impacts

query MyPulledProcesses {
  processes(input: { pulled: true, limit: 20 }) {
    items {
      id
      name
      regionRegionalScope
      outputs { name value unit }     # value + unit = functional unit / batch size
      impacts {
        id
        method
        indicator
        value                          # null unless revealed=true
        unit
        revealed
      }
    }
    total
    hasMore
  }
}

pulled: true filters the list of processes, but each impact row inside a process still reports its own revealed flag. A process where only GWP100 has been pulled will still appear, with other impacts having value: null.

materials

List materials in the library. Pass input.pulled: true to restrict to materials with at least one revealed property; individual properties[].revealed flags still apply within each material.

Schema

type PublicMaterialsPage {
  items: [PublicMaterial!]!
  total: Int!
}

type PublicMaterial {
  id: ID!
  name: String
  description: String
  source: String
  sourceOrganization: String
  functionalUnit: String
  compartment: String
  regionalScopes: String
  datePublished: String
  revealed: Boolean
  isFavorite: Boolean
  "Names of processes that consume this material as an input."
  inputTo: [String!]
  "Names of processes that produce this material as an output."
  outputOf: [String!]
  properties: [PublicMaterialProperty!]
}

type PublicMaterialProperty {
  id: ID!
  name: String
  "Numeric value. Only present when revealed is true."
  value: Float
  unit: String
  description: String
  source: String
  sourceOrganization: String
  datePublished: String
  revealed: Boolean
  "'pulled' if the team paid for this property, 'shared' if it came in another route."
  revealType: String
}

Query — with variables

query SearchMaterials($input: PublicListInput) {
  materials(input: $input) {
    items { id name datePublished }
    total
  }
}

Variables panel:

{ "input": { "pulled": true, "limit": 20 } }

Query — owned listing with revealed properties

query MyPulledMaterials {
  materials(input: { pulled: true, limit: 20 }) {
    items {
      id
      name
      datePublished
      inputTo
      outputOf
      properties {
        id
        name
        value                # null unless revealed=true
        unit
        revealed
        revealType
      }
    }
    total
  }
}

process / material — retrieve by id

Companion single-resource queries to processes / materials. Use them when you already know an id (e.g. from a previous list or pull response). Returns the full resource or a 404 error if the active team can't see it.

query GetProcess($id: ID!) {
  process(id: $id) {
    id
    name
    regionRegionalScope
    datePublished
    revealed
  }
}

query GetMaterial($id: ID!) {
  material(id: $id) {
    id
    name
    compartment
    datePublished
    revealed
  }
}

Variables panel:

{ "id": "bfffd26f-aa46-42ab-9069-e07102b06c4d" }

materialProperty / processImpact — retrieve a single row

Mirror the REST URLs /materials/:materialId/properties/:propertyId and /processes/:processId/impacts/:impactId. Useful when you already know the row id and don't want to download the full material or process payload. Returns a clean error if the child doesn't belong to the named parent.

query GetMaterialProperty($materialId: ID!, $propertyId: ID!) {
  materialProperty(materialId: $materialId, propertyId: $propertyId) {
    id
    name
    value             # null unless revealed=true
    unit
    revealed
    revealType
  }
}

query GetProcessImpact($processId: ID!, $impactId: ID!) {
  processImpact(processId: $processId, impactId: $impactId) {
    id
    method
    indicator
    value             # null unless revealed=true
    unit
    revealed
  }
}

Variables panel:

{
  "materialId": "8c2a17a4-1234-4d1e-9b21-3a8e2c91c0a1",
  "propertyId": "55ada0c0-1234-4d1e-9b21-3a8e2c91c0a1"
}