igpapi — Instagram private API Simulator for Node.js (API reference) 4.19.0
    Preparing search index...

    Function graphqlMutationAccepted

    • Whether the server accepted a GraphQL mutation, read from its answer — the core's one reading of a mutation's refusal (GraphQL refuses in an HTTP 200). The verdict is the one internal reader shared with decodeGraphqlResponse: the server's refusal — its errors beside no answer, an absent root field or a null/false one included — is { accepted: false } with those errors, and the brick that sent the mutation names its own refusal from it; a null or false root field without errors is the refusal with none. Any other root field's value is the accepted mutation, even beside errors (GraphQL reports non-fatal errors next to the data). An answer with neither the root field nor errors is not a mutation answer: GraphqlRootFieldMissingError.

      The one reader of a mutation's acceptance: it takes the response body, which is parsed the way decodeGraphqlResponse parses it, so a deferred stream's patches are merged into the payload the verdict reads. No other path reads a mutation's verdict.

      Parameters

      • body: string
      • rootFieldName: string

      Returns Effect<
          | { accepted: true; value: unknown }
          | { accepted: false; errors: readonly unknown[] },
          ParseError | GraphqlRootFieldMissingError,
      >