IGPAPI
    Preparing search index...

    Function decodeGraphqlResponse

    • Decode a GraphQL response body against schema. The body may carry several concatenated JSON documents (GraphQL incremental delivery — @defer/ @stream), so it is split and merged first; the requested root field may therefore arrive in a later patch. When the merged payload still lacks that root field, a GraphqlRootFieldMissingError is raised rather than letting a raw parse/shape failure surface as a TypeError downstream.

      Type Parameters

      • S extends Top

      Parameters

      • body: string
      • rootFieldName: string
      • schema: S

      Returns Effect<
          S["Type"],
          ParseError
          | GraphqlRootFieldMissingError
          | SchemaError,
          S["DecodingServices"],
      >