haskell-graphql / graphql-api

Write type-safe GraphQL services in Haskell
BSD 3-Clause "New" or "Revised" License
406 stars 35 forks source link

Add tests for anonymous queries w|w/o variables #139

Closed sunwukonga closed 6 years ago

sunwukonga commented 6 years ago

Add tests in ASTTests.hs:

Added tests in ValidationTests.hs:

jml commented 6 years ago

Thanks for this, and indeed all your other contributions.

I’ll try to get to reviewing this as soon as I may. Please forgive the lag—it’s the result of competing priorities, not lack of interest. On Fri, 22 Dec 2017 at 10:59, Paul Desmond Parker notifications@github.com wrote:

Add tests in ASTTests.hs:

  • parses anonymous query documents
    • changed previous test of same name to: parses shorthand syntax documents
  • parses anonymous query with variables

Added tests in ValidationTests.hs:

  • Treats anonymous queries as valid
  • Treats anonymous queries with variables as valid

You can view, comment on, or merge this pull request online at:

https://github.com/jml/graphql-api/pull/139 Commit Summary

  • Make Node instance of HasName. Implement getName
  • Add Data.Text import and clean up unused imports.
  • Fix error when single query is anonymous.
  • Add tests for anonymous queries w|w/o variables

File Changes

Patch Links:

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/jml/graphql-api/pull/139, or mute the thread https://github.com/notifications/unsubscribe-auth/AAHq6lmOoAEdHl2Za0hmikHas7YgfDCbks5tC4uBgaJpZM4RK6eH .

jml commented 6 years ago

I've commented on #137, which I think this depends on. Will take a look at this once #137 is merged.

jml commented 6 years ago

I've just merged #137 (thanks again for your efforts and your patience!). Can you please hit whatever buttons are necessary to give this PR an up-to-date diff from master?

sunwukonga commented 6 years ago

I already rebased this branch on the changes I made to #137. Is that what you mean @jml ? That's why the commit 61cc96b above failed it's tests (fixed by subsequent commit).

If that's insufficient, I'll pull master. Rebase this branch on master and then push again.

jml commented 6 years ago

I just wanted to see a diff vs master. GH is currently showing changes that were made in #137

No worries though, since I created such a diff locally. Everything looks great. Thanks for the tests!