This action may lead to changes in the database
Do you want to continue?
Description
GraphQL is a query language for your API, and a server-side runtime for executing queries by using a type system you define for your data. GraphQL isn't tied to any specific database or storage engine and is instead backed by your existing code and data.
Features:
- Query only the data that you need.
- Obtain several resources in a single request.
- Based on types and fields, and not on endpoints.
- Not versioned.
- Alternative to a REST Api.
Query Anatomy
Basic GraphQL queries:
Every HTTP request we send to a GraphQL API server, is made of these basic operations:
- GraphQL document: A string written in the GraphQL language that defines one or more operations and fragments.
- Operation: A single query, mutation, or subscription that can be interpreted by a GraphQL execution engine.
- Fragment: A set of fields that can be reused in different queries.
- Fields: A unit of data you are asking for, which ends up as a field in your JSON response data. Note that they are always called “fields”, regardless of how deep in the query they appear.
- Arguments: A set of key-value pairs attached to a specific field. These are passed into the server-side execution of this field, and affect how it’s resolved. The arguments can be literal values, as in the query. Arguments can appear on any field, even fields nested deep in an operation.
- Fragments: Part of a GraphQL document which defines a GraphQL fragment. The following GraphQL document, makes two calls to the Communities query, this can be supported by using Aliases, because each field in the JSON object in the response has to be unique.
For more details, about GraphQL queries, please check the following documentation:
GraphiQL
Data Explorer
Web API Query String
Request Information
GraphQL
Executes GraphQL Queries. Support for a GET request with a "query" param passed in the query string
URI Parameters
Name | Description | Type | Additional information |
---|---|---|---|
query |
The GraphQL Query to execute |
string |
Required |
Response
×
The request was made Successfully! Check the result!.
×
Error Something happen, the Api doesn't have a response.
{
"Time": "sample string 1",
"Error": {
"ClassName": "System.Exception",
"Message": null,
"Data": null,
"InnerException": null,
"HelpURL": "sample string 1",
"StackTraceString": null,
"RemoteStackTraceString": null,
"RemoteStackIndex": 0,
"ExceptionMethod": null,
"HResult": 3,
"Source": "sample string 2",
"WatsonBuckets": null
},
"ErrorMessage": "sample string 2",
"Status": "sample string 3",
"Server": "sample string 4",
"Count": 1,
"FavoriteCounts": {
"CommCount": 1,
"PlanCount": 2,
"SpecCount": 3
},
"FavoriteFacets": {
"Cities": [
{
"MarketId": 1,
"Count": 1,
"Distance": 1.1,
"Key": 2,
"Value": "sample string 3",
"State": "sample string 4"
},
{
"MarketId": 1,
"Count": 1,
"Distance": 1.1,
"Key": 2,
"Value": "sample string 3",
"State": "sample string 4"
}
],
"PostalCodes": [
{
"MarketId": 1,
"Count": 1,
"Distance": 1.1,
"Key": 2,
"Value": "sample string 3",
"State": "sample string 4"
},
{
"MarketId": 1,
"Count": 1,
"Distance": 1.1,
"Key": 2,
"Value": "sample string 3",
"State": "sample string 4"
}
],
"Markets": [
{
"MarketId": 1,
"Count": 1,
"Distance": 1.1,
"Key": 2,
"Value": "sample string 3",
"State": "sample string 4"
},
{
"MarketId": 1,
"Count": 1,
"Distance": 1.1,
"Key": 2,
"Value": "sample string 3",
"State": "sample string 4"
}
]
},
"Result": {}
}
<Root>
<Time>sample string 1</Time>
<Error>
<ClassName>System.Exception</ClassName>
<Message />
<Data />
<InnerException />
<HelpURL>sample string 1</HelpURL>
<StackTraceString />
<RemoteStackTraceString />
<RemoteStackIndex>0</RemoteStackIndex>
<ExceptionMethod />
<HResult>3</HResult>
<Source>sample string 2</Source>
<WatsonBuckets />
</Error>
<ErrorMessage>sample string 2</ErrorMessage>
<Status>sample string 3</Status>
<Server>sample string 4</Server>
<Count>1</Count>
<FavoriteCounts>
<CommCount>1</CommCount>
<PlanCount>2</PlanCount>
<SpecCount>3</SpecCount>
</FavoriteCounts>
<FavoriteFacets>
<Cities>
<MarketId>1</MarketId>
<Count>1</Count>
<Distance>1.1</Distance>
<Key>2</Key>
<Value>sample string 3</Value>
<State>sample string 4</State>
</Cities>
<Cities>
<MarketId>1</MarketId>
<Count>1</Count>
<Distance>1.1</Distance>
<Key>2</Key>
<Value>sample string 3</Value>
<State>sample string 4</State>
</Cities>
<PostalCodes>
<MarketId>1</MarketId>
<Count>1</Count>
<Distance>1.1</Distance>
<Key>2</Key>
<Value>sample string 3</Value>
<State>sample string 4</State>
</PostalCodes>
<PostalCodes>
<MarketId>1</MarketId>
<Count>1</Count>
<Distance>1.1</Distance>
<Key>2</Key>
<Value>sample string 3</Value>
<State>sample string 4</State>
</PostalCodes>
<Markets>
<MarketId>1</MarketId>
<Count>1</Count>
<Distance>1.1</Distance>
<Key>2</Key>
<Value>sample string 3</Value>
<State>sample string 4</State>
</Markets>
<Markets>
<MarketId>1</MarketId>
<Count>1</Count>
<Distance>1.1</Distance>
<Key>2</Key>
<Value>sample string 3</Value>
<State>sample string 4</State>
</Markets>
</FavoriteFacets>
<Result />
</Root>
Code Generator
Response Information
ApiResultModelOfObject
Name | Description | Type | Additional information |
---|---|---|---|
Time | string |
None. |
|
Error | Exception |
None. |
|
ErrorMessage | string |
None. |
|
Status | string |
None. |
|
Server | string |
None. |
|
Count | integer |
None. |
|
FavoriteCounts | ApiFavoriteCounts |
None. |
|
FavoriteFacets | ApiFavoriteFacets |
None. |
|
Result | Object |
None. |
|
VerboseLogger | List of IVerboseLogger |
None. |
GET
api/v3/GraphQl/Default?query={query}