Skip to content

ts error in graphql-toolkit when compiling #669

Closed
@maapteh

Description

i went from 0.4 to 0.7 so maybe i missed something crucial in the upgrade path but somehow my app is not compiling anymore. Example:

node_modules/@graphql-modules/core/node_modules/graphql-toolkit/dist/esnext/utils/validate-documents.d.ts:7:129 - error TS1005: ',' expected.

export declare const validateGraphQlDocuments: (schema: GraphQLSchema, documentFiles: DocumentFile[], effectiveRules?: readonly import("graphql").ValidationRule[]) => readonly LoadDocumentError[];

Activity

changed the title ts error when compiling ts error in `graphql-toolkit` when compiling on Sep 6, 2019
dotansimha

dotansimha commented on Sep 9, 2019

@dotansimha
Collaborator

Fixed by @kamilkisiela in ardatan/graphql-toolkit#230
Keeping open until we'll release graphql-toolkit and then `graphql-modules.

ardatan

ardatan commented on Sep 12, 2019

@ardatan
Collaborator

Fixed in 0.7.12 :)

Urigo

Urigo commented on Sep 16, 2019

@Urigo
Owner

@maapteh why did you reopened the issue?

maapteh

maapteh commented on Sep 16, 2019

@maapteh
ContributorAuthor

Ah sorry, i have too many right overhere i think :)

I reopened because the issue still ocurs, less faults but still 2 in 0.7.12:

../../node_modules/@graphql-modules/core/node_modules/graphql-toolkit/dist/esnext/utils/validate-documents.d.ts:8:150 - error TS1005: ',' expected.

8 export declare const validateGraphQlDocuments: (schema: GraphQLSchema, documentFiles: DocumentFile[], effectiveRules?: ValidationRule[]) => readonly LoadDocumentError[];
                                                                                                                                                       ~~~~~~~~~~~~~~~~~

../../node_modules/@graphql-modules/core/node_modules/graphql-toolkit/dist/esnext/utils/validate-documents.d.ts:8:167 - error TS1005: ',' expected.

8 export declare const validateGraphQlDocuments: (schema: GraphQLSchema, documentFiles: DocumentFile[], effectiveRules?: ValidationRule[]) => readonly LoadDocumentError[];
  1. git clone https://github.com/maapteh/graphql-modules-app.git
  2. yarn
  3. yarn workspace graphql-server buildFIXME
Urigo

Urigo commented on Sep 16, 2019

@Urigo
Owner

thanks for the context and the reproduction!

ardatan

ardatan commented on Sep 17, 2019

@ardatan
Collaborator

@maapteh I reproduced the same error with the old TS version in server's package.json 3.2.1 and when I updated it to 3.6.3, it built successfully.
I think it happens because we use a new syntax or something in graphql-toolkit.

maapteh

maapteh commented on Sep 17, 2019

@maapteh
ContributorAuthor

Thanks for this update @ardatan i will update. I know TS is optional in modules, but maybe it should become clear you at least need version x?

ardatan

ardatan commented on Sep 17, 2019

@ardatan
Collaborator

You're right, we should update documentation about TypeScript version compability :)

removed
bugSomething isn't working
on Sep 19, 2019

6 remaining items

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      ts error in `graphql-toolkit` when compiling · Issue #669 · Urigo/graphql-modules