Skip to content

schema.graphql generated as UTF-16 LE #30

@daniloab

Description

@daniloab

When I use get-graphql-schema ENDPOINT_URL > schema.graphql my .graphql is generated as UTF-16 LE.

So when I try run yarn run relay at my react application I got the following error:

Error: Error loading schema. Expected the schema to be a .graphql or a .json
file, describing your GraphQL server's API. Error detail:

GraphQLError: Syntax Error: Cannot parse the unexpected character "\uFFFD".

To correct this problem I had to generate my .graphql on terminal, copy and paste in a new file that I created by myself on my app setting the name as schema.graphql.

With this approach, I was able set UTF-8 at my file and compile my queries using the relay command with yarn.

Is there another approach to fix this on windows?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions