Skip to content

Make GraphQLResult initialisers public #436

@halonsoluis

Description

@halonsoluis

Currently there's no way of creating a GraphQLResult due to every initialiser being internal.

GraphQLResult<Query.Data>(
            data: data,
            errors: nil,
            source: .cache,
            dependentKeys: nil
        )

Fails with message Cannot convert value of type 'Query.Data?' to expected argument type '?'_

and

try GraphQLResponse(operation: query, body: json).parseResult()

Fails due to parseResult() being internal

Reading the threads it's clear to me that at least one of those methods was public before.
What should be the proper way to initialise a custom GraphQLResult?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions