Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

schema.graphql generated as UTF-16 LE #30

Open
daniloab opened this issue May 9, 2019 · 6 comments
Open

schema.graphql generated as UTF-16 LE #30

daniloab opened this issue May 9, 2019 · 6 comments

Comments

@daniloab
Copy link

daniloab commented May 9, 2019

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?

@pantharshit00
Copy link

@daniloab Can you please make a small PR that changes the encoding the in the output of the fs module writeFileSync method.

We will be happy to review and merge it.

mbican added a commit to mbican/get-graphql-schema that referenced this issue Jul 12, 2019
@JacekKosciesza
Copy link

I've exactly the same problem. Temporary fixed it by converting to UTF-8 with Notepad++
image

@guidovini
Copy link

I've exactly the same problem. Temporary fixed it by converting to UTF-8 with Notepad++
image

Thank you. This worked!

@dimitar-nikovski
Copy link

This issue causes various tools to break, a tiny merge of #31 will fix this

@leumasme
Copy link

Issue persists
@schickling This has been sitting for 2 years, can you please take a few minutes to review it? A pull is already pending

@schickling
Copy link
Contributor

I'm really sorry but I don't have any time to maintain this package at the moment. If someone is interested in getting involves as a maintainer, please get in touch!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants