Home / Companies / Apollo / Blog / May 2021

May 2021 Summaries

5 posts from Apollo

Filter
Month: Year:
Post Summaries Back to Blog
GraphQL fragments are a powerful tool in building safer, cleaner, and faster GraphQL applications. By using fragments to declare the data dependencies of child components, developers can separate concerns between parent and child components, making it easier to maintain complex UI code. Fragments also allow for automatic type generation, reducing duplication of code and preventing bugs at build-time. Additionally, fragments enable developers to make a single query to fetch data for multiple components at once, reducing the need for repeated round-trips to the server. By leveraging GraphQL fragments, developers can create more scalable and maintainable applications.
May 31, 2021 1,296 words in the original blog post.
Introducing Build Checks and Webhooks In Apollo Studio` Apollo Studio now offers build checks for federated graphs, providing better visibility into why a build fails, including the ability to download or copy the subgraph schema and the resulting supergraph schema. The recent checks page has been improved with filters to quickly find checks based on various criteria, helping users surface root causes faster. Additionally, build webhooks have been introduced, allowing users to be notified when a new schema is built and ready to ship, as well as alerting on broken builds for quicker error resolution.
May 27, 2021 420 words in the original blog post.
To secure your GraphQL API, it's essential to address authentication and authorization first. Using JSON Web Tokens (JWTs) is a recommended approach for managing user auth. Additionally, limit query depth by using libraries like graphql-depth-limit, paginate list fields where appropriate, improve validation and sanitization, use timeouts to prevent slow or unresponsive services, rate limit APIs, analyze query cost, and implement safelist operations. To further enhance security, turn off introspection in production, mask errors, avoid schema autogeneration, and only allow Apollo Gateway to query subgraph services directly. By implementing these techniques, you can reduce the attack surface area of your GraphQL API and improve its overall security posture.
May 26, 2021 2,404 words in the original blog post.
The GraphQL API using Python, Flask, and Ariadne provides a comprehensive guide to building a GraphQL server with Python. By the end of this article, readers should know how to set up a Python web server with Flask, use the Ariadne library to implement GraphQL, compose a GraphQL schema, perform queries and mutations against a Python GraphQL API, and test the API using a GraphQL IDE such as Apollo Explorer. The guide covers topics including creating a new virtual environment, installing dependencies, setting up a database, defining models, writing resolvers, testing the server, and implementing mutations to update, delete, and create data. The article concludes with best practices for GraphQL development and recommendations for further learning.
May 11, 2021 3,085 words in the original blog post.
You should disable GraphQL introspection in production as it can reveal sensitive information and make it easier for malicious parties to discover vulnerabilities, instead consider using a schema registry like Apollo Studio to securely enable access to your graph and data.
May 07, 2021 1,159 words in the original blog post.