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?
When I use
get-graphql-schema ENDPOINT_URL > schema.graphqlmy .graphql is generated as UTF-16 LE.So when I try run
yarn run relayat my react application I got the following error: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?