GraphQL client error

firetail:graphql-client-error

Type:

Observation

Rule Severity:

Medium

GraphQL query has not been executed.

A GraphQL client error occurs when a query sent to the GraphQL API cannot be executed successfully, typically due to issues such as incorrect query syntax, invalid field requests, or violation of schema constraints. These errors usually indicate a problem with how the client constructs or sends the query, rather than an issue with the server itself. Unaddressed client errors can lead to poor user experience and hinder API adoption.

Remediation

Investigate server logs to determine the root cause for this.

Example Attack Scenario

A front-end application attempts to query the API but requests a field (priceDetails) that doesn't exist in the schema. The API responds with a client error indicating that the field is invalid. If the front-end team doesn’t handle this gracefully or lacks insight into the schema, the error might go unresolved, resulting in a non-functional feature for the end user.

How to Identify with Example Scenario

How to Resolve with Example Scenario

How to Identify with Example Scenario

Find the text in bold to identify issues such as these in API specifications

How to Resolve with Example Scenario

Modify the text in bold to resolve issues such as these in API specifications
References:

More findings

All Findings