GraphiQL Playground
You can see how to access the GraphiQL Playground on the GraphQL API first steps documentation.
Access GraphiQL PlaygroundYou can use the playground to run queries or to explore how to build them. If you’re just starting, you can copy and paste these queries on the playground and discover what each field represents, available operators, and even get real-time validation for erros.
This first query is a type of introspection query, which provides information on fields for datasets:
query IntrospectionQuery { __schema { queryType { name } mutationType { name } subscriptionType { name } types { ...FullType } directives { name description locations args { ...InputValue } } }}
fragment FullType on __Type { kind name description fields(includeDeprecated: true) { name description args { ...InputValue } type { ...TypeRef } isDeprecated deprecationReason } inputFields { ...InputValue } interfaces { ...TypeRef } enumValues(includeDeprecated: true) { name description isDeprecated deprecationReason } possibleTypes { ...TypeRef }}
fragment InputValue on __InputValue { name description type { ...TypeRef } defaultValue}
fragment TypeRef on __Type { name ofType { kind name ofType { kind name ofType { kind name ofType { kind name ofType { kind name ofType { kind name ofType { kind name } } } } } } }}
This second query uses the httpMetrics dataset, with edge application data:
query HttpCalculatedDataTransferred { httpMetrics( limit: 2000 filter: { tsRange: {begin:"2023-01-26T10:00:00", end:"2023-01-26T20:00:00"} } groupBy:[ts] orderBy:[ts_ASC] ) { ts dataTransferredIn dataTransferredOut dataTransferredTotal }}
You can also test this query to filter the IPs that generated the most requests identified by the WAF as attacks to explore more possibilities in the playground:
query TOP5IPsWAFRequests { httpEvents( limit: 5 filter: { tsRange: { begin:"2025-01-15T00:00:00" end:"2025-01-15T20:00:00" }, wafMatchNe: "-" wafAttackFamilyNe: "-" } aggregate: { count: rows } groupBy:[remoteAddress, wafAttackFamily] orderBy:[count_DESC] ) { remoteAddress wafAttackFamily count }}
Or use this one to filter the top attack types, ranked by occurrence.
query Top5Attacks { httpMetrics( limit: 5 filter: { tsRange: { begin:"2025-01-15T00:00:00" end:"2025-01-15T20:00:00" } } groupBy:[wafAttackFamily] orderBy:[wafRequestsThreat_DESC] ) { wafAttackFamily wafRequestsThreat }}
Discover how to leverage the GraphiQL Playground for real-time data analysis and security insights. Watch the video below:
Contributors