Skip to content

Instantly share code, notes, and snippets.

@wilmoore
Last active September 8, 2023 19:39
Show Gist options
  • Select an option

  • Save wilmoore/15db2f9fe4852f48351868e2d40eabe8 to your computer and use it in GitHub Desktop.

Select an option

Save wilmoore/15db2f9fe4852f48351868e2d40eabe8 to your computer and use it in GitHub Desktop.
Income Sources :: Jobs :: 2022 :: HP :: Lens :: Repos :: poly-glass :: team-mo :: match-maker :: GraphQL :: resolvers

Income Sources :: Jobs :: 2022 :: HP :: Lens :: Repos :: poly-glass :: team-mo :: match-maker :: GraphQL :: resolvers

⪼ Made with 💜 by realpolyglot.com

related
entityConnections(params: { type: External, directional: true }) {
  edges {
    node {
      type
      targetEntity {
        id
        hardwareModel
      }
    }
  }
}

Queries

device Query

query Device {
  device(id: "948017ED-CE27-4EBF-A2C1-D8972548E22E") {
    id
    name
    hardwareModel
    entityConnections(params: { directional: true, type: External }) {
      edges {
        node {
          type
          targetEntity {
            id
            hardwareModel
          }
        }
      }
    }
  }
}

device Query RESPONSE

{
  "data": {
    "device": {
      "id": "948017ed-ce27-4ebf-a2c1-d8972548e22e",
      "name": null,
      "hardwareModel": null,
      "entityConnections": {
        "edges": [
          {
            "node": {
              "type": "external",
              "targetEntity": {
                "id": "eb8bb32f-82a2-4e15-91d5-d87d02da1640",
                "hardwareModel": null
              }
            }
          }
        ]
      }
    }
  }
}

deviceConnections Query

query DeviceConnections {
  deviceConnections(
    deviceId: "948017ED-CE27-4EBF-A2C1-D8972548E22E"
    type: External
  ) {
    entityId
    targetEntityId
    targetEntityType
    type
  }
}

deviceConnections Query

{
  "data": {
    "deviceConnections": [
      {
        "entityId": "948017ed-ce27-4ebf-a2c1-d8972548e22e",
        "targetEntityId": "eb8bb32f-82a2-4e15-91d5-d87d02da1640",
        "targetEntityType": "user",
        "type": "external"
      },
      {
        "entityId": "eb8bb32f-82a2-4e15-91d5-d87d02da1640",
        "targetEntityId": "948017ed-ce27-4ebf-a2c1-d8972548e22e",
        "targetEntityType": "device",
        "type": "external"
      }
    ]
  }
}
notable source files

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment