Key Concepts
Note:
This section explains the following key concepts of the GraphQL.
• | Starting Points |
• | Device—Computers, printers, network devices, virtual machines, containers, and other physical and virtual items collectively as represented in inventory and asset records (that is, “hardware inventory” and “hardware assets”), or Technopedia catalog information pertaining to these items (that is, “hardware model”). |
• | Software—Any set of executable code that tells a computer or other device how to work. This includes middle-ware and system software including operating systems, as well as more end-user focused applications. |
• | Operations—To filter the results of a query, you can use the following operations: |
Operation |
Example |
eq (equal to) |
devices(where: {name: {eq: "my_computer"}}) |
not eq (not equal to) |
devices(where: {name: {not: {eq: "not_my_computer"}}}) |
gt (greater than) |
devices(where: {numberOfProcessors: {gt: 2}}) |
lt (less than) |
devices(where: {numberOfProcessors: {lt: 4}}) |
gte (greater than or equal to) |
devices(where: {numberOfProcessors: {gte: 4}}) |
lte (less than or equal to) |
devices(where: {numberOfProcessors: {lte: 2}}) |
contains |
devices(where: {name: {contains: "flexera"}}) |
startsWith |
devices(where: {domain: {startsWith: "flex"}}) |
endsWith |
devices(where: {domain: {endsWith: ".com"}}) |
and |
devices(where: [{domain: {startsWith: "flex"}}, {domain: {endsWith: ".com"}}]) |
or |
devices(where: {or: [{domain: {endWith: ".org"}}, {domain: {endsWith: ".com"}}]}) |
• | @require Directive—Indicates that the particular field is required to be returned. |
• | @flatten (if: Boolean) Directive—Indicates whether the nested fields should be flattened to the top level. This directive simplifies the data structure by bringing the nested fields to the top level, similar to a JOIN in SQL. Flattening is off by default unless text/csv is requested in the Accept HTTP header. |
• | Basic Parameters—For matching of key fields, you can use the following parameters: |
Parameters |
Definition |
id |
The unique identifier for each record. |
limit |
The maximum number of records returned. For example, |
offset |
The starting point from which the data should be retrieved. For example, |
orderBy |
The ordering criteria for the returned results. For example, |