GQLClient class

Class representing your GQL endpoint. You can define headers to be used for each query/mutation.

Constructors

GQLClient(String endpoint, {Map<String, String>? headers})

Properties

endpoint String
final
hashCode int
The hash code for this object.
no setterinherited
headers Map<String, String>
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

mutation({required String mutation, Map<String, dynamic>? variables, Map<String, String>? headers}) Future<GQLResponse>
GQL Mutation using the Dart Http package url is your gql endpoint.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
query({required String query, Map<String, dynamic>? variables, Map<String, String>? headers}) Future<GQLResponse>
GQL Query using the Dart Http package url is your gql endpoint.
setHeaders(Map<String, String> headers) → void
Method to set the headers used in the futures queries/mutations headers Headers that you want to set
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Methods

setGeneralHeaders(Map<String, String> headers) → void
Used to set default headers for all GQLClient that will be created.