Skip to content

Instantly share code, notes, and snippets.

@jedwards1211
Created May 3, 2024 04:25
Show Gist options
  • Save jedwards1211/650915773da63a754de834b8e8957177 to your computer and use it in GitHub Desktop.
Save jedwards1211/650915773da63a754de834b8e8957177 to your computer and use it in GitHub Desktop.
Large GraphQL Query example
const query = gql`
query MetadataSidebarSection(
$organizationId: Int!
$first: Int
$after: String
$last: Int
$before: String
$search: String
$expandedCursors: [String!]
) {
MetadataTreeConnection(
organizationId: $organizationId
first: $first
after: $after
last: $last
before: $before
search: $search
expandedCursors: $expandedCursors
) {
pageInfo {
startCursor
endCursor
hasPreviousPage
hasNextPage
}
edges {
cursor
parent
depth
hasChildren
expanded
node {
tag
deviceId
name
fullName
dataType
isDigital
units
min
max
displayPrecision
rounding
hasAnyChildren
enumTypeId
updatedAt
updatedSeq
deletedAt
# @graphql-typegen extract
Notification {
userId
createdAt
updatedAt
updatedSeq
tag
triggered
triggerId
variant
fields
severity
message
}
}
}
}
}
`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment