flutter_graphql_client 0.2.0 flutter_graphql_client: ^0.2.0 copied to clipboard
Client to POST to GraphQL server
/// Making GRAPHQL calls
final dynamic data = await SimpleCall.callAPI(
querystring: 'valid-query-string' ,
variables: <String, dynamic>{'pay':'load'},
graphClient: graphQlClientInstance ,
)
/// Making REST calls
GET
final dynamic data = await SimpleCall.callRestAPI(
endpoint: 'http://example.com/test' ,
method: 'GET',
graphClient: graphQlClientInstance ,
)
POST
final dynamic data = await SimpleCall.callRestAPI(
endpoint: 'http://example.com/test' ,
method: 'POST',
variables: <String, dynamic>{'pay':'load'},
graphClient: graphQlClientInstance ,
)