Display a Data List with the React Apollo Query Component
lessonDuration 1m 38sFree
GraphQL APIs resolve data lists as arrays. In this lesson, we will display the list of ski days in the browser using a table.
Browse
Find courses, lessons, articles, talks, and podcasts.
270 results for "graphql"
Showing 241–264 · Page 11 of 12
lessonDuration 1m 38sFree
GraphQL APIs resolve data lists as arrays. In this lesson, we will display the list of ski days in the browser using a table.
lessonDuration 2m 9sFree
React Apollo comes with a Mutation component that can be used to send mutation operations to a GraphQL API. In this lesson, we will use the Mutation component to trigger addDay and removeDay mutations.
lessonDuration 5m 41sFree
Sitemaps are an important tool that search engine crawlers use to index your website. By generating a sitemap.xml file, we improve our chances of showing up early in the search results! We'll use gatsby-plugin-sitemap to do the heavy lifting for us, and see how we can use its configuration options to do light tweaks (exclude certain pages based on glob-matching) as well as more involved ones (using GraphQL context to pull in data from our data model, and use that information when generating the sitemap). Once your sitemap is generated, you can submit it to Google through the Google Search Console, or by adding it to robots.txt. More info: https://support.google.com/webmasters/answer/183668?hl=en
lessonDuration 3m 53sFree
Crearás tu propio plugin de fuentes (source plugin) para gatsby para obtener datos de una fuente externa disponible por medio de una API Rest. El plugin integrará los datos como nodos de gatsby y creará las consultas graphql necesarias para ser utilizadas en tu sitio. Para crear un plugin de fuentes utilizaremos algunos de los métodos que la API de gatsby provee como `sourceNodes`, `createNode`,`createNodeId` y `createContentDigest`
lessonDuration 3m 7sFree
When maintaining a blog in Gatsby you might want to give readers heads up of approximately how much time is required to read a post. This lesson will walk through how to get the estimated reading time for each post. We'll examine the Gatsby GraphQL playground to see what data is available from gatsby-transformer-remark and write a GraphQL query to retrieve the estimated reading time for a given post.
lessonDuration 4m 11sFree
Why does Gatsby use GraphQL? This is part 2 of a 4-part series that shows how to create pages in Gatsby, how data becomes hard to manage over time, and how GraphQL helps limit the complexity of data management. In this video, you’ll create a page by hard-coding data into the context, then accessing it via the `pageContext` prop that Gatsby will pass to the template React component.
lessonDuration 2m 42sFree
batchWrite and batchGet are a way to get the parallelism of sending multiple writes or gets in multiple threads regardless of whether or not your language supports threads. This is particularly interesting when implementing GraphQL node resolvers.
lessonDuration 1m 7sFree
The Query component is used to render the state of the network request along with the data that is returned from the GraphQL API. In this lesson, we will refactor our application to include an App component that displays the resulting count returned by the totalDays field.
lessonDuration 2m 46sFree
In this lesson, we'll walk through using Gatsby's useStaticQuery React Hook to request data that we custom sourced from the PokeAPI. We'll copy over a GraphQL query from our GraphQL explorer, clean up the data, and use it to populate Pokemon in our app.
lessonDuration 2m 53sFree
In this lesson, you'll learn how to create custom nodes in Gatsby sourced from data from the PokeAPI. We'll walk through making Gatsby's API available through createNode and how to use it to make our data available to query in GraphQL.
lessonDuration 1m 42sFree
In this lesson, we'll create a new custom React Hook that we'll use to make a GraphQL query to request data that we custom sourced from the PokeAPI. We'll walk through migrating our useStateQuery Gatsby hook to our new custom hook, configuring our output of the custom hook, and using it to access our custom sourced data.
lessonDuration 4m 3s
Similar to `EventList`, we'll need to create a template React component for each individual Event page. To do this, we'll need to add a page query, to access GraphQL variables, to query for individual events by id. Once that data is available, it can be passed into an `Event` component that will display the data for us. For a written version of this course, check out the [Gatsby docs](https://www.gatsbyjs.org/tutorial/building-a-theme/).
lessonDuration 6m 47sFree
Why does Gatsby use GraphQL? This is part 3 of a 4-part series that shows how to create pages in Gatsby, how data becomes hard to manage over time, and how GraphQL helps limit the complexity of data management. In this video, you’ll create product pages from a JSON file and add images to the pages. This video starts to show the complexity of managing complex data.
lessonDuration 4m 14sFree
You will create your own source plugin for gatsby to get external data avaialable through a REST API into gatsby. The plugin will retrieve the data and create the gatsby nodes to make the data available through the gatsby graphql queries so you can use the data into your site. To create this source plugin you will use some of the methods provided by the gatsby API like `sourceNodes`, `createNode`, `createNodeId` and `createContentDigest`
lessonDuration 2m 30s
Learn how to load data from MDX (or any data source) and ensure the necessary folders exist. To do this, we'll need to add the data in a folder in the project and install two plugins: `gatsby-source-filesystem` and `gatsby-transformer-yaml` In `gatsby-config.js`, both of those plugins will be defined in the plugin array and the data will be exposed through out our application through GraphQL. For a written version of this course, check out the [Gatsby docs](https://www.gatsbyjs.org/tutorial/building-a-theme/).
lessonDuration 2m 39sFree
We can send variables to any GraphQL operation and using React Apollo, we can send these variables via the Mutation Component. In this lesson, we will collect data about a ski day from a from and send it to the addDay mutation as variables.
lessonDuration 11m 6s
Being able to resolve related entities in one query is one of the most beneficial features of GraphQL. While the simples solution often is the best, this doesn't hold up for GraphQL connections. The ideal solution is based on the [Relay Cursor Connections Specification](https://facebook.github.io/relay/graphql/connections.htm). In this lesson we start based on a simple solution and apply one feature request after another. Eventually we end up with the Connection Specification.
lessonDuration 2m 42sFree
When you use a component for your table of contents in MDX documents you have more flexibility around how you render it. In this lesson, we'll use Gatsby's GraphQL data layer to fetch the headings in an MDX document and pass them to a TableOfContents component that we create.
lessonDuration 1m 5sFree
Learn how to install and setup gatsby-image plugins to source local images from the filesystem so you can query them with GraphQL, and then use them in your site. - [Using gatsby-image with your site](https://www.gatsbyjs.org/tutorial/gatsby-image-tutorial/) - [gatsby-image documentation](https://www.gatsbyjs.org/packages/gatsby-image)
lessonDuration 3m 24s
In the class version of this component, we had a method called `safeSetState` which would check whether the component was still mounted before trying to call `setState`. This is because our graphql client library is unable to cancel in-flight requests. Let's make that same kind of thing work by tracking the mounted state of our component using the `useRef` and `useEffect` hooks.
lessonDuration 5m 22s
We have a render prop based <Query /> class component that allows us to make a GraphQL request with a given query string and variables and uses a GitHub graphql client that is in React context to make the request. Let's refactor this to a function component that uses the hooks useReducer, useContext, and useEffect.
lessonDuration 3m 29s
Often to get user data you'll make an AJAX request using [`axios`](https://www.npmjs.com/package/axios) or [the `fetch` API](https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API). In this lesson we'll get a GitHub user's company using [GitHub's GraphQL API](https://developer.github.com/v4/) using React's `componentDidMount` lifecycle method.
lessonDuration 6m 22sFree
In this lesson we will use the Mutation component to invoke a mutation of a GraphQL API. In addition we cover how to update the local cache using refetch queries as well as improving the user experience when dealing with mutations. In the end we discuss several gotchas related to Mutations and possible ways on how to tackle them.
lessonDuration 9m 2sFree
In addition to using the AWS AppSync console, we can also use the AWS Amplify CLI to create GraphQL APIs & the AWS Amplify to interact with the API. In this video, we'll look at an alternate way to create & manage your AppSync GraphQL API.