Home / Companies / Apollo / Blog / May 2020

May 2020 Summaries

5 posts from Apollo

Filter
Month: Year:
Post Summaries Back to Blog
This tutorial explains how to implement email and password authentication with `accounts-js` and Apollo Server. The author creates a new Node.js project, sets up the dependencies, including `apollo-server`, `graphql`, and `mongoose`. They then configure `accounts-js` to use MongoDB as its database and create an authentication server using `AccountsServer`. The tutorial demonstrates how to merge the `accounts-js` GraphQL schema with the existing schema, creating a new GraphQL API. The author creates a user, authenticates them, and protects a query using the `@auth` directive. They provide a link to a repository containing the source code for this tutorial.
May 26, 2020 1,392 words in the original blog post.
GraphQL Summit Worldwide is a free virtual event that will take place across two weeks in July and August, offering attendees access to talks and panels from experts in the GraphQL community. The event aims to provide a comfortable and safe experience for all participants, with a split content schedule and multiple environments for learning and networking. To accommodate those who may have been unable to attend previous years due to travel, the virtual format will allow for global participation. Additionally, the event organizers are refunding paid tickets from GraphQL Summit 2020 to attendees, providing an opportunity for them to join the new online conference experience.
May 21, 2020 221 words in the original blog post.
The tutorial demonstrates how to set up authentication and authorization in a GraphQL API using Apollo Federation and Express. It covers the key points of implementing JWT-based authentication with Express middleware, integrating it into an Apollo Gateway API, and adding permissions-based rules with GraphQL Shield middleware in an accounts service. The process involves several steps, including installing dependencies, setting up the gateway API and accounts service, creating a login mutation to obtain a JWT, verifying the JWT using Express middleware, passing the decoded JWT to the implementing service, and applying permissions-based rules with GraphQL Shield middleware. By following this tutorial, developers can create secure GraphQL APIs that protect their data while still allowing authorized users to access it.
May 15, 2020 3,318 words in the original blog post.
Apollo Client 3` is a state management solution that provides a more efficient and scalable alternative to traditional approaches like Redux or React Context. It introduces a normalized cache, which reduces the complexity of data storage and retrieval. The `useQuery` hook abstracts away complex data fetching, state management, and marshaling logic, making it easier to work with remote data. Apollo Client 3 also includes advanced cache manipulation APIs for power users, such as `modify`, `evict`, and `gc`. Additionally, it introduces Cache Policies and Reactive Variables, which provide cleaner patterns for local state management and enable cache reactivity. By using Apollo Client 3, developers can reduce the amount of custom code they need to write and focus on building their application's specific features.
May 13, 2020 2,294 words in the original blog post.
Apollo Data Sources` are a crucial part of building robust GraphQL APIs. They encapsulate the code for interacting with specific data services, such as databases or external APIs, and provide access to the GraphQL context. By using Apollo's built-in `DataSource` classes, developers can create custom data sources that integrate seamlessly with their application. The process involves creating a parent class that defines the policy for interacting with a particular data source, and then extending it with a child class that performs operations specific to the application. This allows developers to cache and batch data fetching, as well as implement authorization headers and error reporting. With this knowledge, developers can create high-performance GraphQL APIs that meet the needs of their users.
May 07, 2020 1,767 words in the original blog post.