Migrate old graphql content

This commit is contained in:
Kamran Ahmed
2025-06-24 00:12:06 +01:00
parent 4038681fb5
commit 91eff12b8f
114 changed files with 4754 additions and 518 deletions
-89
View File
@@ -1,89 +0,0 @@
#!/usr/bin/env python3
import json
import os
import sys
def migrate_content():
"""
Migrate content from content folder to content-migrated folder using mapping file
"""
# Read mapping file
mapping_file = 'migration-mapping.json'
content_dir = 'content'
migrated_dir = 'content-migrated'
try:
with open(mapping_file, 'r') as f:
mapping = json.load(f)
except FileNotFoundError:
print(f"Error: {mapping_file} not found")
return False
except json.JSONDecodeError:
print(f"Error: Invalid JSON in {mapping_file}")
return False
migrated_count = 0
skipped_count = 0
error_count = 0
print(f"Starting migration of {len(mapping)} files...")
for source_path, target_id in mapping.items():
# Determine source file path
if ':' in source_path:
# Nested path like "clean-code-principles:be-consistent"
parts = source_path.split(':')
source_file = os.path.join(content_dir, *parts[:-1], f"{parts[-1]}.md")
else:
# Top level path like "clean-code-principles"
source_file = os.path.join(content_dir, source_path, 'index.md')
# Determine target file path
target_filename = f"{source_path.split(':')[-1]}@{target_id}.md"
target_file = os.path.join(migrated_dir, target_filename)
# Check if target file is empty (needs migration)
if os.path.exists(target_file) and os.path.getsize(target_file) > 0:
print(f"⏭️ Skipped: {target_filename} (already migrated)")
skipped_count += 1
continue
# Check if source file exists
if not os.path.exists(source_file):
print(f"❌ Error: Source file not found: {source_file}")
error_count += 1
continue
try:
# Read source content
with open(source_file, 'r', encoding='utf-8') as f:
content = f.read()
if not content.strip():
print(f"⚠️ Warning: Source file is empty: {source_file}")
continue
# Write to target file
with open(target_file, 'w', encoding='utf-8') as f:
f.write(content)
print(f"✅ Migrated: {source_path} -> {target_filename}")
migrated_count += 1
except Exception as e:
print(f"❌ Error migrating {source_path}: {str(e)}")
error_count += 1
print(f"\n📊 Migration Summary:")
print(f" ✅ Migrated: {migrated_count}")
print(f" ⏭️ Skipped: {skipped_count}")
print(f" ❌ Errors: {error_count}")
print(f" 📁 Total: {len(mapping)}")
return error_count == 0
if __name__ == "__main__":
success = migrate_content()
sys.exit(0 if success else 1)
@@ -0,0 +1,7 @@
# Aliases
Aliases in GraphQL rename fields in query responses, useful when requesting the same field multiple times with different arguments or when field names aren't suitable for client usage. They distinguish fields in responses and improve query readability and usability.
To learn more, visit the following links:
- [@official@What are GraphQL Aliases?](https://graphql.org/learn/queries/#aliases)
@@ -0,0 +1,8 @@
# Apollo Client
Apollo Client is a popular GraphQL client library for JavaScript that provides data fetching, caching, and state management. It offers declarative data fetching with React hooks, intelligent caching, optimistic UI updates, and error handling for building efficient GraphQL-powered applications.
Learn more from the following links:
- [@article@Why Apollo Client - Frontend?](https://www.howtographql.com/react-apollo/0-introduction/)
- [@feed@Explore top posts about Apollo](https://app.daily.dev/tags/apollo?ref=roadmapsh)
@@ -0,0 +1,8 @@
# Apollo Server
Apollo Server is a popular open-source library for building GraphQL servers in JavaScript. It provides tools for parsing, validating, executing resolvers, and formatting responses with built-in features for authentication, authorization, data validation, and real-time subscriptions.
Learn more from the following links:
- [@article@Apollo Tutorial - Introduction](https://www.howtographql.com/react-apollo/0-introduction/)
- [@feed@Explore top posts about Apollo](https://app.daily.dev/tags/apollo?ref=roadmapsh)
@@ -0,0 +1,7 @@
# Arguments
Arguments in GraphQL are values passed to fields or directives to specify execution details like filtering, sorting, pagination, or configuration options. They're passed as key-value pairs, can be defined as variables, and may be optional or required depending on the field definition.
Learn more from the following links:
- [@official@GraphQL - Arguments](https://graphql.org/learn/queries/#arguments)
@@ -1,6 +1,6 @@
# Authorization
Authorization in GraphQL refers to the process of controlling access to specific fields, types, or operations in a GraphQL schema based on user roles or permissions. It allows you to restrict access to certain data or functionality in your application based on the user's role or permissions.
Authorization in GraphQL controls access to data and operations based on user permissions and roles. It can be implemented at the schema level, field level, or within resolvers, ensuring users only access data they're permitted to see through various authentication and permission strategies.
There are several ways to implement authorization in GraphQL:
@@ -1,10 +0,0 @@
# Apollo Server
Apollo Server is a popular open-source library for building GraphQL servers in JavaScript. It provides a simple and flexible way to build GraphQL servers by providing a set of tools and features for handling common tasks such as parsing and validating queries, executing resolvers, and formatting responses.
One of the key features of Apollo Server is that it provides a set of built-in functionality that makes it easy to handle common tasks such as authentication, authorization, and data validation. It also provides support for subscriptions, which allow clients to receive real-time updates from the server.
Learn more from the following links:
- [@article@Apollo Tutorial - Introduction](https://www.howtographql.com/react-apollo/0-introduction/)
- [@feed@Explore top posts about Apollo](https://app.daily.dev/tags/apollo?ref=roadmapsh)
@@ -1,10 +0,0 @@
# GraphQL Yoga
GraphQL Yoga is a popular open-source GraphQL server library for Node.js. It is built on top of the popular Express.js web framework and provides a simple and flexible way to build GraphQL servers with minimal boilerplate code.
One of the key features of GraphQL Yoga is that it provides a set of built-in functionality that makes it easy to handle common tasks such as authentication, authorization, and data validation. It also provides support for subscriptions, which allow clients to receive real-time updates from the server.
Learn more from the following links:
- [@article@GraphQL Armor - for Yoga Server 2](https://the-guild.dev/blog/improved-security-with-graphql-armor-support-for-yoga-server-2)
- [@feed@Explore top posts about GraphQL](https://app.daily.dev/tags/graphql?ref=roadmapsh)
@@ -1,13 +0,0 @@
# Backend Implementations
There are several ways to implement a GraphQL backend, depending on the use case, the technology stack, and the complexity of the application. The most common ways to implement a GraphQL backend are:
- Building a custom GraphQL server
- Using a GraphQL backend-as-a-service
- Wrapping a REST API with a GraphQL layer
- Using a microservices architecture
Learn more from the following links:
- [@article@How to use GraphQL to build Backend?](https://www.howtographql.com/typescript-apollo/0-introduction/)
- [@feed@Explore top posts about Backend Development](https://app.daily.dev/tags/backend?ref=roadmapsh)
@@ -1,5 +0,0 @@
# Mercurius
Mercurius is an open-source library for building real-time GraphQL servers in Node.js. It provides a simple and flexible way to build GraphQL servers by providing a set of tools and features for handling real-time subscriptions.
One of the key features of Mercurius is that it is built on top of the popular WebSockets protocol and it allows the client to subscribe to real-time updates from the server. It also supports batching and caching of queries and mutations, which allows for efficient and fast data transfer between the client and server.
@@ -0,0 +1,3 @@
# Batching
Batching in GraphQL combines multiple queries into a single request to reduce network overhead and improve performance. DataLoader is a common pattern that batches and caches database requests, preventing N+1 query problems and optimizing data fetching efficiency.
@@ -1,5 +1,7 @@
# Caching
Caching in GraphQL improves performance by storing query results for reuse. Strategies include HTTP caching, response caching, dataloader for batching requests, and normalized caching at the client level to reduce redundant API calls and improve user experience.
Caching is a technique that is used to improve the performance of a GraphQL server by reducing the number of requests that need to be made to the data source. It works by storing a copy of the data that has been requested by a client in a cache, and then returning that data from the cache instead of the data source when the same data is requested again.
There are several types of caching that can be used in GraphQL:
@@ -0,0 +1,7 @@
# Defer & Stream Directives
Defer and Stream directives are experimental GraphQL features for incremental data delivery. @defer postpones non-critical fields to improve initial response times, while @stream sends list items progressively, enabling better user experiences with large datasets and slow-loading fields.
Learn more from the following links:
- [@article@Defer and Stream in GraphQL](https://the-guild.dev/graphql/yoga-server/docs/features/defer-stream)
@@ -0,0 +1,7 @@
# Directives
Directives in GraphQL modify query execution by adding behavior or validation to fields, operations, and fragments. They can take arguments to configure behavior and include built-in directives like @include and @skip, or custom ones defined by developers for specific functionality.
To learn more, visit the following links:
- [@official@Directives in GraphQL](https://graphql.org/learn/queries/#directives)
@@ -0,0 +1,7 @@
# Enums
Enums (enumeration types) are special scalars restricted to a particular set of allowed values. They validate arguments against allowed values and communicate through the type system that fields will always be one of a finite set of predefined options.
Learn more from the following links:
- [@official@What are Enums?](https://graphql.org/learn/schema/#enumeration-types)
@@ -0,0 +1,3 @@
# Event-Based Subscriptions
Event-based subscriptions in GraphQL provide real-time updates by subscribing to specific events or data changes. Clients maintain persistent connections through WebSockets to receive live updates when subscribed events occur, enabling reactive applications with real-time functionality.
@@ -1,8 +0,0 @@
# Execution
In GraphQL, execution refers to the process of executing a query or mutation and returning the result to the client. The execution process includes several steps such as parsing, validation, and data retrieval, that are performed by the GraphQL engine to produce the final response to the client.
Learn more from the following links:
- [@official@Get Started with Execution in GraphQL](https://graphql.org/learn/execution/)
- [@official@Intro to Execution](https://graphql.org/graphql-js/execution/)
@@ -1,9 +0,0 @@
# Resolvers
In GraphQL, a resolver is a function that is responsible for fetching the data for a field in a query or mutation. Resolvers are defined in the schema and are executed by the GraphQL server when a query or mutation is received.
Each field in a GraphQL schema has a corresponding resolver function that is responsible for returning the data for that field. The resolver function can retrieve the data from a database, a third-party API, or any other source, and return it to the client.
Learn more from the following links:
- [@article@Guide to Resolver](https://the-guild.dev/blog/better-type-safety-for-resolvers-with-graphql-codegen)
@@ -1,9 +0,0 @@
# Validation
In GraphQL, validation refers to the process of ensuring that a query or mutation adheres to the rules defined in the schema. This includes verifying that the query or mutation only accesses fields and types that are defined in the schema, and that the input values for fields are of the correct type and within the specified constraints.
GraphQL servers perform validation on all incoming queries and mutations to ensure that they are valid before executing them. If a query or mutation is invalid, the server will return an error, indicating which parts of the query or mutation are invalid and why.
Learn more from the following links:
- [@official@Get Started with Validation in GraphQL](https://graphql.org/learn/validation/)
@@ -0,0 +1,8 @@
# Execution
Execution in GraphQL is the process of running queries or mutations and returning results to clients. The GraphQL engine performs parsing, validation, and data retrieval steps to produce the final response, coordinating resolver functions to fetch data from various sources.
Learn more from the following links:
- [@official@Get Started with Execution in GraphQL](https://graphql.org/learn/execution/)
- [@official@Intro to Execution](https://graphql.org/graphql-js/execution/)
@@ -0,0 +1,7 @@
# Fields
Fields in GraphQL are individual pieces of data that can be queried or modified, representing properties of the requested data. They're defined in the GraphQL schema and serve as building blocks for queries and mutations, specifying what data is available for each type.
Learn more from the following links:
- [@official@GraphQL: Types and Fields](https://graphql.org/learn/queries/#fields)
@@ -0,0 +1,7 @@
# Fragments
Fragments in GraphQL are reusable pieces of queries that retrieve specific fields from one or more types. Defined with the "fragment" keyword, they promote code reuse, reduce duplication, and make complex queries more maintainable by separating common field selections.
To learn more, visit the following links:
- [@official@Intro to Fragments in GraphQL](https://graphql.org/learn/queries/#fragments)
@@ -1,10 +0,0 @@
# Apollo Client
Apollo Client is a popular JavaScript library for building client applications that consume GraphQL APIs. It is developed and maintained by the Apollo team and is widely used in the industry.
Apollo Client provides a set of features that make it easy to interact with a GraphQL server, such as querying, mutating, and subscribing to data. It also provides a caching system to store the results of previous queries, which improves the performance of the application.
Learn more from the following links:
- [@article@Why Apollo Client - Frontend?](https://www.howtographql.com/react-apollo/0-introduction/)
- [@feed@Explore top posts about Apollo](https://app.daily.dev/tags/apollo?ref=roadmapsh)
@@ -1,10 +0,0 @@
# Frontend Implementations
In GraphQL, the frontend refers to the client-side of the application, typically the web or mobile app that the end-user interacts with.
When using GraphQL on the frontend, developers can use a GraphQL client library, such as Apollo Client or Relay, to interact with the GraphQL server. These libraries provide a way to easily send GraphQL queries and mutations to the server and handle the response.
Learn more from the following links:
- [@article@Guide to GraphQL for Front-End Developers](https://www.howtographql.com/react-apollo/0-introduction/)
- [@feed@Explore top posts about Frontend Development](https://app.daily.dev/tags/frontend?ref=roadmapsh)
@@ -1,9 +0,0 @@
# Relay
Relay is a JavaScript framework that was developed by Facebook to build data-driven applications using GraphQL. It provides a set of tools and conventions that make it easier to build efficient and scalable applications that use GraphQL.
Relay is designed to work with GraphQL on the server and provides a set of client-side libraries for building client applications. It provides a set of components and hooks that make it easy to build efficient and scalable applications.
Learn more from the following links:
- [@article@GraphQL Code Generator & Relay Compiler](https://the-guild.dev/blog/graphql-codegen-relay-compiler)
@@ -1,7 +0,0 @@
# URQL
URQL is a highly customizable and versatile GraphQL client with which you add on features like normalized caching as you grow. It's built to be both easy to use for newcomers to GraphQL, and extensible, to grow to support dynamic single-app applications and highly customized GraphQL infrastructure.
Visit the following resources to learn more:
- [@article@urql - Formidable Labs](https://formidable.com/open-source/urql/)
@@ -0,0 +1,3 @@
# GraphQL Go
GraphQL Go refers to implementing GraphQL servers and clients using the Go programming language. Popular libraries include graphql-go/graphql for schema-first development and 99designs/gqlgen for code-first generation. Go's strong typing and performance make it excellent for building scalable GraphQL APIs.
@@ -0,0 +1,3 @@
# graphql-http
GraphQL over HTTP is a specification that defines how GraphQL queries and mutations should be transported over HTTP. It standardizes request/response formats, HTTP methods, status codes, and headers, ensuring consistent GraphQL API communication across different implementations.
@@ -1,12 +0,0 @@
# GraphQL on the Backend
In GraphQL, the backend refers to the server-side of the application, where the data is stored and processed.
When using GraphQL on the backend, developers can create a GraphQL server that handles the incoming GraphQL queries and mutations from the frontend. This can be implemented using a GraphQL library or framework, such as Apollo Server, Express-GraphQL, or GraphQL-Java.
The GraphQL server is responsible for handling the incoming queries and mutations, validating them against a schema, and executing them by fetching data from the database or other data sources. The server then returns the requested data to the client in a predictable format, as defined by the schema.
Learn more from the following links:
- [@article@How to use GraphQL in Backend?](https://www.howtographql.com/)
- [@feed@Explore top posts about Backend Development](https://app.daily.dev/tags/backend?ref=roadmapsh)
@@ -1,12 +0,0 @@
# GraphQL on the Frontend
In GraphQL, the frontend refers to the client-side of the application, typically the web or mobile app that the end-user interacts with.
When using GraphQL on the frontend, developers can use a GraphQL client library, such as Apollo Client or Relay, to interact with the GraphQL server. These libraries provide a way to easily send GraphQL queries and mutations to the server and handle the response.
By using GraphQL on the frontend, developers can benefit from the flexibility and efficiency of GraphQL when querying data. Instead of having to make multiple REST API calls or hardcode data into the frontend, the client can specify exactly the data it needs in a single request, and the server will return it in a predictable format.
Learn more from following links:
- [@article@Get started with GraphQL on the frontend](https://www.howtographql.com/react-apollo/0-introduction/)
- [@feed@Explore top posts about Frontend Development](https://app.daily.dev/tags/frontend?ref=roadmapsh)
@@ -1,13 +0,0 @@
# GraphQL Introduction
GraphQL is a query language and runtime for APIs. It is used to build and consume web service APIs.
GraphQL allows clients to make a single API call to request exactly the data they need, in a predictable format. This allows for more efficient and flexible data retrieval, compared to traditional REST APIs where the client has to make multiple API calls to different endpoints, and may receive more data than it needs.
With GraphQL, the client defines the structure of the data it needs, by sending a query to the server. The server then returns the requested data in the same structure, as defined by the query. The client can also make mutations to update or create data on the server.
To learn more, visit the following links:
- [@official@Introduction to GraphQL](https://graphql.org/learn/)
- [@official@Getting started with GraphQL](https://graphql.org/)
- [@feed@Explore top posts about GraphQL](https://app.daily.dev/tags/graphql?ref=roadmapsh)
@@ -1,13 +0,0 @@
# Problems GraphQL Solves
GraphQL solves several problems commonly faced when building APIs, including:
- **Over-fetching:** With REST APIs, the client often receives more data than it needs, resulting in wasted bandwidth and slow performance. GraphQL allows the client to specify exactly the data it needs, reducing over-fetching.
- **Under-fetching:** With REST, the client often has to make multiple requests to different endpoints to gather all the data it needs, resulting in additional latency and complexity. GraphQL allows the client to request all the necessary data in a single request.
- **Inefficient versioning:** With REST, creating a new endpoint for each version of an API can quickly become cumbersome and hard to maintain. GraphQL allows for seamless versioning by adding new fields and types, rather than creating new endpoints.
- **Lack of flexibility:** REST APIs are typically fixed, meaning that the client has to work with the data structure provided by the API. GraphQL allows the client to request exactly the data it needs and receive it in a predictable format, increasing flexibility.
- **Microservice communicating** with Federation or Supergraph implementation you can easily query data from multiple microservice in one single query without code overhead or request overhead (if nothing requested from one microservice it wouldn't make a real network request for this data)
@@ -1,9 +0,0 @@
# Thinking in Graphs
"Thinking in Graphs" is a mindset or approach when working with GraphQL. It refers to the way that data is organized and queried in GraphQL, which is based on the concept of a graph.
In GraphQL, data is represented as a graph, where nodes represent objects and edges represent relationships between them. This allows for a more flexible and intuitive way of querying data, as the client can specify exactly the data it needs by following the relationships between nodes in the graph.
Learn more from the following links:
- [@official@GraphQL - Thinking in Graphs](https://graphql.org/learn/thinking-in-graphs/)
@@ -1,11 +0,0 @@
# What is GraphQL
GraphQL is a query language for your API, and a server-side runtime for executing queries 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.
A GraphQL service is created by defining types and fields on those types, then providing functions for each field on each type.
To learn more, visit the following links:
- [@official@Introduction to graphQL](https://graphql.org/learn/)
- [@article@Tutorial - What is graphQL?](https://www.howtographql.com/basics/0-introduction/)
- [@feed@Explore top posts about GraphQL](https://app.daily.dev/tags/graphql?ref=roadmapsh)
@@ -0,0 +1,3 @@
# GraphQL Java
GraphQL Java is a popular library for implementing GraphQL APIs in Java applications. It provides schema-first development capabilities, runtime query execution, and integrates well with Spring Boot and other Java frameworks, making it a solid choice for enterprise GraphQL implementations.
@@ -0,0 +1,8 @@
# GraphQL on the Backend
GraphQL on the backend involves implementing servers that execute GraphQL queries, mutations, and subscriptions. It includes defining schemas, writing resolvers, handling data sources, implementing authentication/authorization, and optimizing performance through caching and batching strategies.
Learn more from the following links:
- [@article@How to use GraphQL in Backend?](https://www.howtographql.com/)
- [@feed@Explore top posts about Backend Development](https://app.daily.dev/tags/backend?ref=roadmapsh)
@@ -0,0 +1,8 @@
# GraphQL on the Frontend
GraphQL on the frontend enables efficient data fetching with clients like Apollo, URQL, or Relay. It provides declarative data requirements, intelligent caching, real-time subscriptions, and type safety, allowing frontend applications to request exactly the data they need in a single query.
Learn more from following links:
- [@article@Get started with GraphQL on the frontend](https://www.howtographql.com/react-apollo/0-introduction/)
- [@feed@Explore top posts about Frontend Development](https://app.daily.dev/tags/frontend?ref=roadmapsh)
@@ -0,0 +1,3 @@
# GraphQL Over HTTP Spec
The GraphQL over HTTP specification defines standard practices for serving GraphQL over HTTP, including request/response formats, status codes, and content types. It ensures interoperability between different GraphQL implementations and provides guidance for consistent API behavior across platforms.
@@ -1,7 +0,0 @@
# 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:
- [@official@What are GraphQL Aliases?](https://graphql.org/learn/queries/#aliases)
@@ -1,7 +0,0 @@
# 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:
- [@official@GraphQL - Arguments](https://graphql.org/learn/queries/#arguments)
@@ -1,7 +0,0 @@
# 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:
- [@official@Directives in GraphQL](https://graphql.org/learn/queries/#directives)
@@ -1,9 +0,0 @@
# 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:
- [@official@GraphQL: Types and Fields](https://graphql.org/learn/queries/#fields)
@@ -1,7 +0,0 @@
# 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:
- [@official@Intro to Fragments in GraphQL](https://graphql.org/learn/queries/#fragments)
@@ -1,8 +0,0 @@
# 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:
- [@article@GraphQL Variables](https://dgraph.io/docs/graphql/api/variables/)
- [@official@Intro to Variables in GraphQL](https://graphql.org/learn/queries/#variables)
@@ -1,7 +0,0 @@
# 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:
- [@official@Introduction of GraphQL - Query](https://graphql.org/learn/queries/)
@@ -7,4 +7,4 @@ A GraphQL query is structured as a single object, with a "query" or "mutation" f
To learn more, visit the following links:
- [@official@What are GraphQL Queries?](https://graphql.org/learn/queries/)
- [@feed@Explore top posts about GraphQL](https://app.daily.dev/tags/graphql?ref=roadmapsh)
- [@feed@Explore top posts about GraphQL](https://app.daily.dev/tags/graphql?ref=roadmapsh)
@@ -0,0 +1,8 @@
# GraphQL Yoga
GraphQL Yoga is an open-source GraphQL server library for Node.js built on Express.js. It provides minimal boilerplate setup with built-in authentication, authorization, data validation, and subscription support for real-time updates, making GraphQL server development streamlined.
Learn more from the following links:
- [@article@GraphQL Armor - for Yoga Server 2](https://the-guild.dev/blog/improved-security-with-graphql-armor-support-for-yoga-server-2)
- [@feed@Explore top posts about GraphQL](https://app.daily.dev/tags/graphql?ref=roadmapsh)
@@ -0,0 +1,3 @@
# GraphQL.js
GraphQL.js is the reference implementation of GraphQL for JavaScript and Node.js. It provides the core functionality for parsing, validating, and executing GraphQL queries, serving as the foundation for many other GraphQL tools and libraries in the JavaScript ecosystem.
@@ -0,0 +1,7 @@
# Interfaces
Interfaces in GraphQL define a set of fields that implementing types must include. They enable polymorphism by allowing common field querying across different types that implement the same interface, promoting code reuse and consistent API design.
Learn more from the following links:
- [@official@Get started with Interfaces](https://graphql.org/learn/schema/#interfaces)
@@ -0,0 +1,9 @@
# GraphQL Introduction
GraphQL is a query language and runtime for APIs that enables clients to request exactly the data they need in a single call. It provides a predictable format, reducing multiple API calls and eliminating over-fetching, making data retrieval more efficient than traditional REST APIs.
To learn more, visit the following links:
- [@official@Introduction to GraphQL](https://graphql.org/learn/)
- [@official@Getting started with GraphQL](https://graphql.org/)
- [@feed@Explore top posts about GraphQL](https://app.daily.dev/tags/graphql?ref=roadmapsh)
@@ -0,0 +1,7 @@
# Lists
Lists in GraphQL represent ordered collections of items, defined using square brackets around the item type. They can contain scalars, objects, or other lists, enabling complex nested data structures and array-based field returns in schemas.
Learn more from the following links:
- [@official@Get started with Lists](https://graphql.org/learn/schema/#lists-and-non-null)
@@ -0,0 +1,7 @@
# Live Queries
Live Queries automatically update query results when underlying data changes, providing real-time synchronization without manual subscription management. This advanced feature simplifies building reactive applications by maintaining fresh data automatically, though it requires specialized GraphQL implementations.
Learn more from the following links:
- [@article@GraphQL Live Queries](https://the-guild.dev/blog/collecting-graphql-live-query-resource-identifier-with-graphql-tools)
@@ -0,0 +1,3 @@
# Mercurius
Mercurius is a high-performance GraphQL server library for Fastify, offering excellent performance and minimal memory usage. It provides schema-first development, built-in caching, subscriptions support, and integration with Fastify's ecosystem for building fast, scalable GraphQL APIs.
@@ -0,0 +1,7 @@
# Multiple Mutation Fields
GraphQL allows multiple mutations in a single query by including multiple mutation fields, called batching or chaining mutations. This enables performing several data modifications atomically, improving efficiency and ensuring consistent state changes across related operations.
Learn more from the following links:
- [@official@Guide to Multiple fields in mutations](https://graphql.org/learn/queries/#multiple-fields-in-mutations)
@@ -1,7 +0,0 @@
# Multiple Mutation Fields
In GraphQL, it is possible to perform multiple mutations in a single query by including multiple "mutation" fields in the query. This is called "batching" or "chaining" mutations.
Learn more from the following links:
- [@official@Guide to Multiple fields in mutations](https://graphql.org/learn/queries/#multiple-fields-in-mutations)
@@ -1,7 +0,0 @@
# Operation Name
In GraphQL, an operation name is an optional identifier that can be used to uniquely identify a query or a mutation in a document containing multiple operations. It can be used to provide more meaningful names for operations, making it easier to understand the purpose of the operation and to identify it in the event of an error.
Learn more from the following resources:
- [@official@Intro to Operation Name](https://graphql.org/learn/queries/#operation-name)
@@ -1,9 +0,0 @@
# What are Mutations
In GraphQL, a mutation is a type of query used to make changes to data on the server. It is used to create, update, or delete data, and is structured similarly to a query, but with a "mutation" field at the top level instead of a "query" field.
A mutation typically includes fields that specify the data to be changed and the operation to be performed (e.g. "create", "update", or "delete"). It can also include arguments to specify the specific data to be affected.
Learn more from the following resources:
- [@official@Get started with Mutations](https://graphql.org/learn/mutations/)
@@ -6,4 +6,4 @@ The mutation includes fields that specify the data to be changed, the operation
To learn more, visit the following links:
- [@official@Getting started with Mutations](https://graphql.org/learn/queries/#mutations)
- [@official@Getting started with Mutations](https://graphql.org/learn/queries/#mutations)
@@ -0,0 +1,8 @@
# Objects
Objects in GraphQL are types that represent groups of fields, defining the structure of queries and mutations. Each field can return scalar values or other objects, enabling complex nested data structures. Objects are defined using the "type" keyword followed by the name and field definitions.
To learn more, visit the following:
- [@official@Object Types and Fields](https://graphql.org/learn/schema/#object-types-and-fields)
- [@official@Object Types](https://graphql.org/graphql-js/object-types/)
@@ -0,0 +1,7 @@
# Operation Name
Operation names are optional identifiers for GraphQL queries and mutations that help uniquely identify operations in documents with multiple operations. They provide meaningful names for operations, improve debugging, and make error identification easier in complex applications.
Learn more from the following resources:
- [@official@Intro to Operation Name](https://graphql.org/learn/queries/#operation-name)
@@ -1,13 +0,0 @@
# Pagination
Pagination in GraphQL refers to the process of breaking up large sets of data into smaller chunks, also known as pages, and providing a way to navigate between these pages. This allows clients to retrieve a specific subset of data, rather than having to retrieve all of the data at once, which can be beneficial for performance, especially when working with large datasets.
There are several ways to implement pagination in GraphQL:
- Cursor-based pagination
- Offset-based pagination
- Relay-style pagination
To learn more, visit the following links:
- [@official@Get Started with Pagination](https://graphql.org/learn/pagination/)
@@ -0,0 +1,7 @@
# Pagination
Pagination in GraphQL handles large datasets by breaking them into smaller chunks. Common approaches include cursor-based pagination (using cursors for stable pagination) and offset-based pagination (using skip/take), with cursor-based being preferred for performance and consistency.
To learn more, visit the following links:
- [@official@Get Started with Pagination](https://graphql.org/learn/pagination/)
@@ -0,0 +1,3 @@
# Problems GraphQL Solves
GraphQL solves major API problems including over-fetching (getting unnecessary data), under-fetching (multiple requests needed), inefficient versioning, and lack of flexibility. It enables precise data requests, single queries for multiple resources, seamless versioning through schema evolution, and microservice communication through federation.
@@ -0,0 +1,7 @@
# Realtime
Realtime GraphQL enables live data updates through subscriptions, allowing clients to receive instant notifications when data changes. Implemented using WebSockets, Server-Sent Events, or polling, it's essential for chat applications, live feeds, and collaborative tools requiring immediate data synchronization.
Learn more from the following links:
- [@article@Get Started with Real Time with GraphQL](https://the-guild.dev/blog/subscriptions-and-live-queries-real-time-with-graphql)
@@ -0,0 +1,7 @@
# Relay
Relay is Facebook's GraphQL client designed for React applications, emphasizing performance and data consistency. It uses a declarative approach with fragments, automatic query optimization, pagination handling, and strict conventions for building scalable, efficient GraphQL applications.
Learn more from the following links:
- [@article@GraphQL Code Generator & Relay Compiler](https://the-guild.dev/blog/graphql-codegen-relay-compiler)
@@ -0,0 +1,7 @@
# Resolvers
Resolvers are functions responsible for fetching data for each field in GraphQL queries and mutations. Defined in the schema and executed by the GraphQL server, they retrieve data from databases, APIs, or other sources and return it to clients.
Learn more from the following links:
- [@article@Guide to Resolver](https://the-guild.dev/blog/better-type-safety-for-resolvers-with-graphql-codegen)
@@ -0,0 +1,7 @@
# Scalars
Scalars are "leaf" values in GraphQL representing primitive data types. Built-in scalars include String, Int, Float, Boolean, and ID for unique identifiers. Custom scalars can be defined for specific needs like dates, JSON, or large integers, extending the type system beyond basic primitives.
Learn more from the following links:
- [@official@Get started with Scalars in GraphQL](https://graphql.org/learn/schema/#scalar-types)
@@ -1,10 +0,0 @@
# Enums
Enums also called as enumeration types are a special kind of scalar that is restricted to a particular set of allowed values. This allows you to:
- Validate that any arguments of this type are one of the allowed values
- Communicate through the type system that a field will always be one of a finite set of values
Learn more from the following links:
- [@official@What are Enums?](https://graphql.org/learn/schema/#enumeration-types)
@@ -1,9 +0,0 @@
# Schema
In GraphQL, a schema is a blueprint that defines the types, fields, and operations (queries and mutations) that are available to clients. The schema is the contract between the client and the server, specifying what data can be requested and how it can be modified.
A GraphQL schema is defined using the GraphQL Schema Definition Language (SDL), which is a human-readable syntax for defining the structure of a GraphQL API. The SDL includes keywords such as **type**, **query**, **mutation**, **field**, and **argument** to define the different components of a schema.
Learn more from the following links:
- [@official@Get started with Schema](https://graphql.org/learn/schema/)
@@ -1,9 +0,0 @@
# Interfaces
In GraphQL, an interface is a type that defines a set of fields that a type must implement. Interfaces are defined using the interface keyword, and can be used to define common fields for multiple types.
In GraphQL, lists can also be used within interfaces to define the return type for fields.
Learn more from the following links:
- [@official@Get started with Interfaces](https://graphql.org/learn/schema/#interfaces)
@@ -1,9 +0,0 @@
# Lists
In GraphQL, a list is a type that represents an ordered collection of items. Lists are defined using square brackets, with the type of the items inside.
Lists are used to represent an array of items in a GraphQL schema, and can be used as the return type for a field in an object type. Lists can contain any type of items, including scalars and other objects, and can also be nested within other lists.
Learn more from the following links:
- [@official@Get started with Lists](https://graphql.org/learn/schema/#lists-and-non-null)
@@ -1,8 +0,0 @@
# Objects
In GraphQL, an object is a type that represents a group of fields. Objects can be used to define the structure of a query or a mutation. Each field of an object can return a scalar value (such as a string or an integer) or another object, allowing for the creation of complex, nested data structures. In a GraphQL schema, objects are defined using the **type** keyword, followed by the object's name and a set of fields in curly braces.
To learn more, visit the following:
- [@official@Object Types and Fields](https://graphql.org/learn/schema/#object-types-and-fields)
- [@official@Object Types](https://graphql.org/graphql-js/object-types/)
@@ -1,17 +0,0 @@
# Scalars
Scalars are “leaf” values in GraphQL. There are several built-in scalars, and you can define custom scalars, too. (Enums are also leaf values.) The built-in scalars are:
- **String**, like a JSON or Ruby string
- **Int**, like a JSON or Ruby integer
- **Float**, like a JSON or Ruby floating point decimal
- **Boolean**, like a JSON or Ruby boolean (true or false)
- **ID**, which a specialized String for representing unique object identifiers
- **ISO8601DateTime**, an ISO 8601-encoded datetime
- **ISO8601Date**, an ISO 8601-encoded date
- **JSON**, This returns arbitrary JSON (Ruby hashes, arrays, strings, integers, floats, booleans and nils). Take care: by using this type, you completely lose all GraphQL type safety. Consider building object types for your data instead.
- **BigInt**, a numeric value which may exceed the size of a 32-bit integer
Learn more from the following links:
- [@official@Get started with Scalars in GraphQL](https://graphql.org/learn/schema/#scalar-types)
@@ -1,13 +0,0 @@
# Type System
GraphQL is a strongly typed language. Type System defines various data types that can be used in a GraphQL application. The type system helps to define the schema, which is a contract between client and server. The commonly used GraphQL data types are as follows:
- Scalar
- Object
- Query
- Mutation
- Enum
Learn more from the following links:
- [@official@Get started with Type system](https://graphql.org/learn/schema/#type-system)
@@ -1,9 +0,0 @@
# Unions
Unions are useful in cases where a field can return multiple types and you want to handle those types differently in your client. They also allow for more flexibility in how you structure your schema, as you can group types together that share common fields.
Unions don't allow to specify a common set of fields to be queried across multiple types, but it allows to handle multiple types differently in your client.
Learn more from the following links:
- [@official@Get started with Union in GraphQL](https://graphql.org/learn/schema/#union-types)
@@ -0,0 +1,7 @@
# Schema
A GraphQL schema defines the structure and capabilities of a GraphQL API using Schema Definition Language (SDL). It specifies types, fields, arguments, relationships, and root operations (Query, Mutation, Subscription) that serve as entry points, acting as a contract between client and server.
Visit the following resources to learn more:
- [@official@What is Schema?](https://graphql.org/learn/schema/)
@@ -1,9 +0,0 @@
# Batching
Batching in GraphQL refers to the process of sending multiple queries or mutations in a single request. This allows the client to reduce the number of round trips to the server, and can improve the performance of the application.
There are several ways to implement batching in GraphQL:
- Using a batching library: This approach involves using a library such as apollo-link-batch-http, which provides a way to batch multiple queries or mutations into a single request.
- Using a middleware: This approach involves using a middleware such as graphql-batch, which allows you to batch multiple queries or mutations into a single request.
- Using a serverless function: This approach involves using a serverless function such as AWS Lambda, which allows you to batch multiple queries or mutations into a single request.
@@ -1,10 +0,0 @@
# GraphQL over HTTP
GraphQL over HTTP refers to the ability to send GraphQL queries and mutations over the HTTP protocol. This allows clients to interact with a GraphQL server using the same standard HTTP methods and headers that are used for other types of web requests.
The most common way to send GraphQL queries and mutations over HTTP is by using the **POST** method, where the query or mutation is sent in the request body as a JSON payload. The server will then execute the query or mutation and return the result in the response body.
To learn more, visit the following links:
- [@official@Serving over HTTP](https://graphql.org/learn/serving-over-http/)
- [@feed@Explore top posts about GraphQL](https://app.daily.dev/tags/graphql?ref=roadmapsh)
@@ -1,12 +0,0 @@
# GraphQL Over SSE
GraphQL over SSE (Server-Sent Events) is a way to use the Server-Sent Events (SSE) protocol to send real-time updates from the server to the client over a single HTTP connection.
SSE is a simple and efficient protocol for sending real-time updates from the server to the client over a single HTTP connection. It's supported by most modern web browsers and it's easy to implement on the server side.
To implement GraphQL over SSE, you can use a library such as graphql-sse which provides a way to send GraphQL updates over SSE. This library allows you to handle SSE connections and events, and to send and receive GraphQL updates over the SSE connection.
To learn more, visit the following links:
- [@article@Overview of GraphQL over SSE (Server-Sent Events)](https://the-guild.dev/blog/graphql-over-sse)
- [@feed@Explore top posts about GraphQL](https://app.daily.dev/tags/graphql?ref=roadmapsh)
@@ -1,8 +0,0 @@
# GraphQL Over Websockets
The WebSocket API is an advanced technology that makes it possible to open a two-way interactive communication session between the user's browser and a server. With this API, you can send messages to a server and receive event-driven responses without having to poll the server for a reply.
Learn more from the following links:
- [@article@GraphQL over WebSockets](https://the-guild.dev/blog/graphql-over-websockets)
- [@feed@Explore top posts about GraphQL](https://app.daily.dev/tags/graphql?ref=roadmapsh)
@@ -1,7 +0,0 @@
# Real Time
Real-time in GraphQL refers to the ability to receive real-time updates from a GraphQL server. This allows clients to receive updates from the server as soon as they occur, rather than having to periodically poll the server for new data.
Learn more from the following links:
- [@article@Get Started with Real Time with GraphQL](https://the-guild.dev/blog/subscriptions-and-live-queries-real-time-with-graphql)
@@ -1,4 +1,4 @@
# Serving Over Internet
# Serving over Internet
Serving GraphQL over the internet refers to the process of making a GraphQL server available to clients over the internet, typically by exposing the server's endpoint through a public IP address or a domain name.
@@ -10,4 +10,4 @@ There are several ways to serve a GraphQL server over the internet:
To learn more, visit the following links:
- [@official@Introduction to Serving over HTTPs](https://graphql.org/learn/serving-over-http/)
- [@official@Introduction to Serving over HTTPs](https://graphql.org/learn/serving-over-http/)
@@ -0,0 +1,3 @@
# Specification
The GraphQL specification is the official standard that defines the GraphQL query language, type system, execution algorithm, and validation rules. It ensures consistency across different GraphQL implementations and serves as the authoritative reference for developers building GraphQL services and tools.
@@ -0,0 +1,3 @@
# Specification
The GraphQL specification defines the core language, type system, execution model, and validation rules for GraphQL. Maintained by the GraphQL Foundation, it provides the technical foundation that all GraphQL implementations must follow to ensure interoperability and consistency across platforms.
@@ -1,9 +0,0 @@
# Defer Stream Directives
In GraphQL, the "defer" and "stream" directives are used to control the handling of fields and their associated data. These directives allow developers to control how data is fetched and sent over the network, and can be used to optimize the performance of a GraphQL API.
The "defer" directive is used to delay the fetching of a field's data until the data is actually needed by the client. This can be useful for improving the performance of an API by reducing the amount of data that needs to be fetched upfront.
Learn more from the following links:
- [@article@Defer and Stream in GraphQL](https://the-guild.dev/graphql/yoga-server/docs/features/defer-stream)
@@ -1,5 +0,0 @@
# Event Based Subscriptions
Event-based subscriptions in GraphQL are a way to push real-time updates to the client based on specific events that occur on the server. These events can be triggered by external sources such as user actions, sensor data, or other systems, or by internal actions such as database updates.
With event-based subscriptions, the client can subscribe to a specific event or set of events and receive updates in real-time as soon as the event occurs. This allows the client to receive notifications about important changes in the system without the need to constantly poll the server for updates.
@@ -1,9 +0,0 @@
# Live Queries
In GraphQL, live queries, also known as "real-time queries" or "subscriptions to queries", is a way to push real-time updates to the client, when the data that is being queried changes on the server. It allows the client to subscribe to a specific query and receive updates in real-time as soon as the data changes.
With live queries, the client can subscribe to a specific query and receive updates when the data that is being queried changes on the server. The client can also specify the fields and arguments of the query, and the server will only send updates for the fields that the client has requested.
Learn more from the following links:
- [@article@GraphQL Live Queries](https://the-guild.dev/blog/collecting-graphql-live-query-resource-identifier-with-graphql-tools)
@@ -1,9 +0,0 @@
# What are Subscriptions
In GraphQL, subscriptions are a way to push real-time updates to the client. They allow a client to subscribe to a specific event or data change on the server, and receive updates in real-time as soon as the event occurs or the data changes.
Subscriptions are defined on the server and are structured similar to queries and mutations. They have a "subscription" field at the top level, followed by the fields that define the event or data change to be subscribed to.
To learn more, visit the following links:
- [@article@How GraphQL Subscriptions Work?](https://the-guild.dev/blog/subscriptions-and-live-queries-real-time-with-graphql)
@@ -6,4 +6,4 @@ A subscription includes a "subscription" field at the top level, followed by the
Learn more from following links:
- [@article@Subscriptions and Live Queries - Real Time with GraphQL](https://the-guild.dev/blog/subscriptions-and-live-queries-real-time-with-graphql)
- [@article@Subscriptions and Live Queries - Real Time with GraphQL](https://the-guild.dev/blog/subscriptions-and-live-queries-real-time-with-graphql)

Some files were not shown because too many files have changed in this diff Show More