September 2016 Summaries
8 posts from Apollo
Filter
Month:
Year:
Post Summaries
Back to Blog
The author of the text is David Yahalomi and he implemented Redis Pub/Sub system for GraphQL subscriptions as part of the Apollo project. The implementation allows for easy integration of external Pub/Sub systems like Redis, enabling consistent propagation of published events to their subscribers. The package `graphql-redis-subscriptions` makes it easy to connect Redis with GraphQL subscriptions by providing a `RedisPubSub` class that can be used in place of the default pub/sub system. The author tested the performance of the system and found that it scales well, but noted that running a GraphQL query for each subscriber and each event could become a bottleneck if not optimized. To improve scalability, the author suggests implementing shared execution for subscribers with the same query. The package has been updated to include options for passing configuration to each call of subscribe, allowing pub/sub engines to reduce their subscription set using the best method of that engine.
Sep 29, 2016
1,497 words in the original blog post.
The text discusses using Apollo GraphQL with VueJS. It introduces vue-apollo, an npm package that allows writing GraphQL queries in VueJS components while using Apollo under the hood. The package is installed along with the Apollo client and plugin for VueJS. With this setup, developers can fetch data from their GraphQL server directly within their components. They can also use GraphQL mutations to update their data. The example provided demonstrates how to use vue-apollo to query and mutate data, showcasing its capabilities in fetching data and updating local state automatically.
Sep 27, 2016
735 words in the original blog post.
The native code generation tools at Facebook are designed to help developers build productivity-enhancing tools on top of GraphQL. These tools take a description of the type system and a set of GraphQL queries as an input, and output a set of response models and query requests. The tools use a fragment-based model approach, which allows for more modular and maintainable code. This approach enables developers to easily catch fetching errors at compile time, rather than runtime. The tools are built on top of the open-source JavaScript GraphQL reference implementation and have been used by Facebook's engineers since 2012.
Sep 21, 2016
1,268 words in the original blog post.
The text discusses the development of a GraphQL client for iOS, specifically designed to return typed results for GraphQL queries. The goal is to address the issues of manually writing code to parse query results in statically typed languages like Swift, which can lead to repetitive and error-prone parsing code. The client uses code generation to generate native model classes that know how to parse raw JSON into properly typed data objects, providing compile-time safety and code completion benefits. The Apollo iOS client is still at its early stages, but it aims to provide a seamless integration with the Xcode build process and offers a sample app and playgrounds for experimentation. The development team encourages feedback and contributions from the community, as they plan to bring Apollo to other platforms in the future.
Sep 20, 2016
947 words in the original blog post.
The GraphQL community has been hyped after GitHub announced a major public GraphQL API, marking the first step towards GraphQL being a stable, production-ready platform. The GraphQL.org website has undergone a complete overhaul from the ground up, providing comprehensive learning materials, an engaging front page, an ever-growing list of companies using GraphQL, a complete interactive reference for queries and schemas, examples and links for various GraphQL servers and clients, and a new community page to get involved and learn more.
Sep 16, 2016
592 words in the original blog post.
The GitHub GraphQL API is a significant development that marks a massive leap forward for API design. It offers several key benefits over traditional REST APIs, including the ability to request exactly what data is needed, reducing the number of requests required and improving performance. The API is also self-documenting and strongly-typed, making it easier to maintain and use. GitHub's new API is notable because it is a large-scale, public GraphQL API, and its adoption is expected to be significant due to the growing interest in GraphQL technology. The API itself is well-documented and easy to explore using tools like GraphiQL or Apollo Client, allowing developers to build powerful applications against the API. With ongoing development and refinement, the GitHub GraphQL API will continue to evolve and improve, offering a robust platform for developers to build on.
Sep 15, 2016
1,065 words in the original blog post.
GraphQL Subscriptions in Apollo Client allow developers to introduce new levels of interactivity to their apps with near-realtime updates, enabling clients to keep updated on the latest changes between different users. The design leverages existing publish-subscribe systems and clients specify the data they want to subscribe to by sending a query with the subscription keyword to the server. On the server-side, subscriptions are implemented using a WebSocket connection and a simple publish-subscribe system, where the server subscribes to one or more pub/sub channels based on the subscription field name. The client specifies the name of the subscription and any relevant arguments, and the server runs the GraphQL query specified in the subscription when something is published to one of these channels. A long-lived connection is necessary for subscriptions, which can deliver more than one result, making them similar to mutations but with a different usage pattern. To demonstrate how to wire up subscriptions with Apollo Client and a JavaScript GraphQL server, an example app called GitHunt was created, showcasing the implementation of subscriptions in detail.
Sep 12, 2016
1,428 words in the original blog post.
The author of this article argues that the current way of calling the server with REST API through central Angular services is not a good fit for Component-based architecture. They propose co-locating queries with view logic, using GraphQL to achieve this. The benefits include each component specifying its own data dependencies without knowing a central service or another parent component in the current render tree, fetching exactly the information that this Component tree needs in one single request, and exposing new fields without changing existing endpoints. This approach allows components to be reusable, self-contained, and adaptable to changes in their requirements. The article concludes by emphasizing that GraphQL can bring these benefits to Angular applications, alongside regular REST services, and notes several notable talks and resources on the topic.
Sep 09, 2016
1,212 words in the original blog post.