parent
ff0215673c
commit
12c1773965
8 changed files with 69 additions and 8 deletions
@ -1 +1,9 @@ |
||||
# What are queries |
||||
# What are Queries |
||||
|
||||
In GraphQL, a query is a request made by the client to the server to retrieve data. Queries are used to fetch data from the server and are structured as a hierarchical tree of fields, which correspond to the properties of the data being requested. |
||||
|
||||
Learn more from following links: |
||||
|
||||
- [Introduction of GraphQL - Query](https://www.tutorialspoint.com/graphql/graphql_query.htm) |
||||
- [What is a GraphQL Query?](https://www.apollographql.com/blog/graphql/examples/what-is-a-graphql-query-graphql-query-using-apollo-explorer/) |
||||
- [Understanding GraphQL Queries](https://www.youtube.com/watch?v=_hTnvOFKsUs) |
||||
|
@ -1 +1,10 @@ |
||||
# Fields |
||||
# Fields |
||||
|
||||
In GraphQL, fields are the individual pieces of data that can be queried or modified. They represent the properties of the data being requested or modified, and are the building blocks of queries and mutations. |
||||
|
||||
Fields are defined in the GraphQL schema, which is a blueprint of the data that can be queried and modified. The schema defines the types of data that can be queried, and the fields that are available for each type. |
||||
|
||||
Learn more from the following links: |
||||
|
||||
- [GraphQL Tutorial: How to use fields?](https://www.educative.io/blog/graphql-tutorial) |
||||
- [GraphQL: Types and Fields](https://typegraphql.com/docs/types-and-fields.html) |
@ -1 +1,8 @@ |
||||
# Aliases |
||||
# Aliases |
||||
|
||||
Aliases in GraphQL are a way to rename fields when they are requested in a query. They are useful in situations where a field is requested multiple times, but with different arguments, or when the field has a name that is not suitable for the client's usage. They make it easy to distinguish and work with fields in the response and make the query more readable. |
||||
|
||||
To learn more, visit the following links: |
||||
|
||||
- [What are GraphQL aliases?](https://blog.logrocket.com/using-aliases-graphql/) |
||||
- [How to use GraphQL aliases?](https://atheros.ai/blog/how-to-use-graphql-aliases) |
@ -1 +1,8 @@ |
||||
# Arguments |
||||
# Arguments |
||||
|
||||
Arguments in GraphQL are pieces of information that are passed to a field or a directive to specify additional details about how the field should be executed. They can be used to filter, sort, or paginate data, or to specify additional options when creating, updating, or deleting data. They can be passed as key-value pairs, defined as variables, and can be optional or required. |
||||
|
||||
Learn more from the following links: |
||||
|
||||
- [GraphQL - Passing Arguments](https://graphql.org/graphql-js/passing-arguments/) |
||||
- [Different ways to pass an argument in GraphQL?](educative.io/answers/what-are-different-ways-to-pass-an-argument-in-graphql) |
@ -1 +1,8 @@ |
||||
# Directives |
||||
# Directives |
||||
|
||||
Directives in GraphQL are a way to modify the execution of a query or a field. They are used to add additional behavior or validation to a query or a field, and can be applied to fields, operations (queries and mutations) and fragments. Directives can take one or more arguments to configure their behavior, and can be defined by the developer or used one of the built-in directives provided by GraphQL. |
||||
|
||||
To learn more, visit the following links: |
||||
|
||||
- [Directives in GraphQL](https://www.apollographql.com/docs/apollo-server/schema/directives/) |
||||
- [What You Need to Know About GraphQL Directives](https://stepzen.com/blog/graphql-directives) |
@ -1 +1,8 @@ |
||||
# Variables |
||||
# Variables |
||||
|
||||
Variables in GraphQL are a way to pass dynamic values to a query or a mutation. They allow the client to make a query more dynamic and flexible by passing in different values for the same argument. They are defined in the query or mutation using the **$** symbol followed by the variable name and a type, and their values must be passed in a separate JSON object. They also are type-safe, this means that variables must be passed values that are of the same type as defined in the query. |
||||
|
||||
To learn more, visit the following links: |
||||
|
||||
- [GraphQL Variables](https://dgraph.io/docs/graphql/api/variables/) |
||||
- [Intro to Variables in GraphQL](https://graphql.org/learn/queries/#variables) |
@ -1 +1,8 @@ |
||||
# Fragments |
||||
# Fragments |
||||
|
||||
In GraphQL, a fragment is a reusable piece of a GraphQL query that can be used to retrieve specific fields from one or more types of data. A fragment is defined using the "fragment" keyword, followed by the name of the fragment and the type of data it is querying. The fields to be retrieved are then specified within curly braces. |
||||
|
||||
To learn more, visit the following links: |
||||
|
||||
- [Fragments of GraphQL](https://graphql.org/learn/queries/#fragments) |
||||
- [Intro to Fragments in GraphQL](https://graphql.org/learn/queries/#fragments) |
@ -1 +1,10 @@ |
||||
# Graphql queries |
||||
# GraphQL Queries |
||||
|
||||
GraphQL is a query language for APIs. It provides a simple and flexible syntax for making requests to a server to retrieve specific data. In GraphQL, a query is a request made to the server to fetch data. The query specifies the fields of the data that should be returned, and the server responds with the requested data. |
||||
|
||||
A GraphQL query is structured as a single object, with a "query" or "mutation" field at the top level. The "query" field is used to retrieve data, while the "mutation" field is used to make changes to the data. The query is written in a specific format and is executed by the server to retrieve the requested data. |
||||
|
||||
To learn more, visit the following links: |
||||
|
||||
- [what is GraphQL queries](https://graphql.org/learn/queries/) |
||||
- [Live Queries - Real Time with GraphQL](https://the-guild.dev/blog/subscriptions-and-live-queries-real-time-with-graphql) |
Loading…
Reference in new issue