Skip to content

GraphQL documentation #933

Answered by ingoratsdorf
ingoratsdorf asked this question in Q&A
Discussion options

You must be logged in to vote

Never been a big friend of GitHUB CoPilot, but:

Can you show an example for a query using the graphql schema in https://github.com/jokob-sk/NetAlertX/blob/main/server/graphql_server/graphql_schema.py

result:

Certainly! Here is an example of how you can perform a GraphQL query using curl to fetch device data from the GraphQL schema defined in server/graphql_server/graphql_schema.py.

Example Query to Fetch Devices

First, let's define the GraphQL query to fetch devices with pagination and sorting options.

query GetDevices($options: PageQueryOptionsInput) {
  devices(options: $options) {
    devices {
      rowid
      devMac
      devName
      devOwner
      devType
      devVendor
      d…

Replies: 2 comments 2 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
2 replies
@ingoratsdorf
Comment options

@jokob-sk
Comment options

Answer selected by ingoratsdorf
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants