Przeglądaj źródła

15552 graphql docs (#15578)

* 15552 update query

* 15552 update query

* 15552 update query

* Update docs/integrations/graphql-api.md

Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>

---------

Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>
Arthur Hanson 1 rok temu
rodzic
commit
c8d288671e
1 zmienionych plików z 6 dodań i 2 usunięć
  1. 6 2
      docs/integrations/graphql-api.md

+ 6 - 2
docs/integrations/graphql-api.md

@@ -54,7 +54,11 @@ For more detail on constructing GraphQL queries, see the [Graphene documentation
 The GraphQL API employs the same filtering logic as the UI and REST API. Filters can be specified as key-value pairs within parentheses immediately following the query name. For example, the following will return only sites within the North Carolina region with a status of active:
 The GraphQL API employs the same filtering logic as the UI and REST API. Filters can be specified as key-value pairs within parentheses immediately following the query name. For example, the following will return only sites within the North Carolina region with a status of active:
 
 
 ```
 ```
-{"query": "query {site_list(region:\"north-carolina\", status:\"active\") {name}}"}
+query {
+  site_list(filters: {region: "us-nc", status: "active"}) {
+    name
+  }
+}
 ```
 ```
 In addition, filtering can be done on list of related objects as shown in the following query:
 In addition, filtering can be done on list of related objects as shown in the following query:
 
 
@@ -63,7 +67,7 @@ In addition, filtering can be done on list of related objects as shown in the fo
   device_list {
   device_list {
     id
     id
     name
     name
-    interfaces(enabled: true) {
+    interfaces(filters: {enabled: true}) {
       name
       name
     }
     }
   }
   }