Skip to content
This repository was archived by the owner on Mar 19, 2019. It is now read-only.

Fix IntrospectionQuery when use non-GET methods#29

Open
varavut wants to merge 3 commits intojahewson:masterfrom
varavut:master
Open

Fix IntrospectionQuery when use non-GET methods#29
varavut wants to merge 3 commits intojahewson:masterfrom
varavut:master

Conversation

@varavut
Copy link
Copy Markdown

@varavut varavut commented Oct 23, 2016

Hello,

I have try to use elm-graphql with Apollo Server that require to use only POST method and I found some problems and try to fix as below.

  1. options.method and options.schema is not pass to the config object.
  • add them to elmPackageJson.graphql instead elmPackageJson because the config object wull read from elmPackageJson.graphql.
    2) encode body with JSON.stringify is not work
  • use the json: true option and set body object to body property directly.
    3) In my app there are some custon scalar types such as Date that will make unexpected type error
  • log the error instead throw an error then a user will can fix elm code manually.

Thank you for your work.

in non-GET request use json: true option instead JSON.stringify() and change body type to any instead string
Copy link
Copy Markdown

@ldesgoui ldesgoui left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Had the same problem, this fixed it for me

@anagrius
Copy link
Copy Markdown

@jahewson Is this project dead, or is it safe to use?

@jahewson
Copy link
Copy Markdown
Owner

@anagrius, it's safe to use - sorry I've been crazy busy but I will be merging PRs and fixing bugs soon.

@jahewson jahewson added the bug label Dec 16, 2016
@ghost
Copy link
Copy Markdown

ghost commented Jan 17, 2017

Really looking forward to using this with POST-only server + Elm 0.18

@wpcarro
Copy link
Copy Markdown

wpcarro commented Mar 9, 2017

@jahewson this would be very helpful with Absinthe (Elixir's GraphQL library). Could you merge please?

@ronanyeah
Copy link
Copy Markdown

Any news on this?

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants