Skip to content

Commit

Permalink
Fix type error in getDataFromTree
Browse files Browse the repository at this point in the history
  • Loading branch information
jerelmiller committed Dec 5, 2024
1 parent 562f157 commit 782ed67
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/react/components/__tests__/ssr/getDataFromTree.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import React from "react";
import gql from "graphql-tag";
import { DocumentNode } from "graphql";

import { ApolloClient } from "../../../../core";
import { ApolloClient, TypedDocumentNode } from "../../../../core";
import { InMemoryCache as Cache } from "../../../../cache";
import {
ApolloProvider,
Expand Down Expand Up @@ -37,7 +37,7 @@ describe("SSR", () => {
});

it("should run through all of the queries (also defined via Query component) that want SSR", () => {
const query = gql`
const query: TypedDocumentNode<Data> = gql`
{
currentUser {
firstName
Expand All @@ -63,7 +63,7 @@ describe("SSR", () => {

const WrappedElement = () => (
<Query query={query}>
{({ data, loading }: { data: Data; loading: boolean }) => (
{({ data, loading }) => (
<div>
{loading || !data ? "loading" : data.currentUser!.firstName}
</div>
Expand Down

0 comments on commit 782ed67

Please sign in to comment.