Location · GraphQL query

location query

Retrieves a Location by its graph object id: a physical place, identified by its global plus code and street address, that observed positions resolve to. The address comes from reverse geocoding and can be corrected by a user. Its positionsSeen field lists the PositionSeen coordinates inside it; find locations with graphSearch on the LOCATION object type. Returns a not-found error when no object has the id, and an error when the id belongs to another object type.

Response

Returns a LocationPayload!

Arguments

Name Description
id - ID! The Location identifier.
mockOptions - MockDataInput Options for mock data generation. Options supported: none.

Example

Query

query location(
  $id: ID!,
  $mockOptions: MockDataInput
) {
  location(
    id: $id,
    mockOptions: $mockOptions
  ) {
    node {
      id
      orgId
      seen {
        ...SeenOnlineFragment
      }
      objectType
      objectTypeLabel
      displayName
      firstSeen
      lastSeen
      createdAt
      updatedAt
      snapshotInfo {
        ...GraphObjectSnapshotInfoFragment
      }
      address {
        ...PhysicalAddressFragment
      }
      addressCorrected
      plusCodeGlobalCode
      positionsSeen {
        ...PositionSeenConnectionFragment
      }
      findings {
        ...FindingsPayloadFragment
      }
      issues {
        ...IssuesPayloadFragment
      }
      issuesSummary {
        ...IssuesSummaryFragment
      }
    }
  }
}

Variables

{"id": 4, "mockOptions": MockDataInput}

Response

{"data": {"location": {"node": Location}}}