Closed rsmith-cs-ux closed 2 years ago
@rsmith-cs-ux can you provide the code where you are defining GET_NOTES
, and the GetNotesQuery
and GetNotesQueryVariables
types?
Sorry about that! They were literally copied from the example in the documentation:
// queries.ts
import { gql } from 'glimmer-apollo';
export const GET_NOTES = gql`
query GetNotes {
notes {
id
title
description
}
}
`;
export interface GetNotesQuery {
__typename?: 'Query';
notes: {
__typename?: 'Note';
id: string;
title: string;
description: string;
}[];
}
export interface GetNotesQueryVariables {}
and then imported into my ember component with:
import { GET_NOTES } from './queries';
import { useQuery } from 'glimmer-apollo';
import type { GetNotesQuery, GetNotesQueryVariables } from './queries';
Thank you for your help!
Spun up a new project and it appears that setting composite: true
in our tsconfig.json
file is the culprit. I'm still figuring out why, but I'll close this out since it doesn't appear to be anything wrong with the library. Thanks for all your help!
Hi there,
Using the notes example from the docs I get Typescript compile errors:
for the code
I know I must be doing something silly here, but does anyone know how I can fix this? Thank you in advance for any help you can provide!