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

Add enums support #25

Merged
merged 20 commits into from
Nov 22, 2018
Merged

Add enums support #25

merged 20 commits into from
Nov 22, 2018

Conversation

makarenkoanton
Copy link
Contributor

@makarenkoanton makarenkoanton commented Nov 1, 2018

Hi, it's my first pull request. I tried to add support of enums type.

VerachadW and others added 17 commits September 27, 2016 22:01
* Update Spek version

* Fix print wrong escaped character, Fix VerachadW#4

* Rewrite the GraphQLPrintSpek for preetty print test

* Bump hotfix version

* Update build status link
* bump to kotlin v1.1.1

* Add type alias for more readable code

* Change the package name to me.lazmaid.kraph

* Fix build failed dur to hamkrest error

* Update spek version

* Update ENV for release

* Update README
* WIP

* Split the print logic into sealed class

* Update UTs

* Add exception message

* Refactor
* Add Test Coverage

* Update spek version

* Fix test result path

* Add codecov YAML

* Add onlyIf

* Update config

* Fix travis command

* Add coverage badge
* Add support for boolean type

* Add Tests
missing "h" in the example call to `println(query.toGrapQueryString())`
* improve readme

* Allow using field with a block in place of field object

* Update readme to include new changes

* Cheap implementation of fragment that doesn't use actual GraphQL Fragments

* Add fragment docs to readme

* Fix tests

* Change function to 'defineFragment'
* Update .gitignore

* Update dependecies

* Add secondary constructor for DataEntry.NonDecimalNUmber

* Add Test for DataEntry classes

* Fix failed UTs
* improve readme

* Allow using field with a block in place of field object

* Update readme to include new changes

* Cheap implementation of fragment that doesn't use actual GraphQL Fragments

* Add fragment docs to readme

* Fix tests

* Add separate methods to print the different parts of the request separately

* Use spaces instead of newlines for request format

* Rewrite printing operations to optionally escape quotes

* update readme a bit

* Change function to 'defineFragment'

* Use an enum to choose print format and write tests to cover all formats

* Add note about variables
* add support for variables

* add support for variables
@VerachadW
Copy link
Owner

Hi, Thanks for the PR. Could you also add test here as well? I will check in this weekends.

@makarenkoanton
Copy link
Contributor Author

Hi, sorry for late answer. I tried write the test, but I can't run it. Can you help me with test?

@VerachadW
Copy link
Owner

VerachadW commented Nov 7, 2018 via email

@codecov-io
Copy link

codecov-io commented Nov 7, 2018

Codecov Report

Merging #25 into develop will not change coverage.
The diff coverage is 82.6%.

Impacted file tree graph

@@            Coverage Diff             @@
##             develop      #25   +/-   ##
==========================================
  Coverage      83.43%   83.43%           
  Complexity        69       69           
==========================================
  Files             16       16           
  Lines            157      157           
  Branches          29       29           
==========================================
  Hits             131      131           
  Misses             9        9           
  Partials          17       17
Impacted Files Coverage Δ Complexity Δ
...e/lazmaid/kraph/NoFieldsInSelectionSetException.kt 100% <ø> (ø) 1 <0> (ø) ⬇️
...otlin/me/lazmaid/kraph/lang/relay/RelayMutation.kt 100% <ø> (ø) 0 <0> (ø) ⬇️
...rc/main/kotlin/me/lazmaid/kraph/lang/relay/Node.kt 0% <ø> (ø) 0 <0> (ø) ⬇️
.../main/kotlin/me/lazmaid/kraph/lang/SelectionSet.kt 100% <100%> (ø) 3 <3> (ø) ⬇️
.../src/main/kotlin/me/lazmaid/kraph/lang/Document.kt 100% <100%> (ø) 5 <5> (ø) ⬇️
...src/main/kotlin/me/lazmaid/kraph/lang/Variables.kt 100% <100%> (ø) 9 <9> (ø) ⬇️
...src/main/kotlin/me/lazmaid/kraph/lang/DataEntry.kt 100% <100%> (ø) 1 <1> (ø) ⬇️
...kotlin/me/lazmaid/kraph/NoSuchFragmentException.kt 100% <100%> (ø) 1 <1> (ø) ⬇️
...otlin/me/lazmaid/kraph/lang/relay/InputArgument.kt 100% <100%> (ø) 2 <2> (ø) ⬇️
.../main/kotlin/me/lazmaid/kraph/types/CustomTypes.kt 100% <100%> (ø) 0 <0> (ø) ⬇️
... and 10 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update be90274...a8ec979. Read the comment docs.

@makarenkoanton
Copy link
Contributor Author

Hi, thank you, I installed Spek plugin, and now I can run test. I wrote some tests, and tried to coverage new enum type, but now i don't understand, what i need more to do for successful codecov's job

@VerachadW
Copy link
Owner

From what I checked, CodeCov shows that your coverage is missing 1 branch here.
https://codecov.io/gh/VerachadW/kraph/compare/4d64d7d80edf75963759a471460e403cf55eff7d...ee3b49dc073eb08df59ee0628bf60cc39d719563/diff

From your testing, I suspected that it matches the condition of the KraphVariableType instead of enum type.

@VerachadW VerachadW changed the base branch from master to develop November 15, 2018 15:59
@VerachadW
Copy link
Owner

I just change the target branch to develop. Please update your test to trigger CI again

@makarenkoanton
Copy link
Contributor Author

makarenkoanton commented Nov 22, 2018

@VerachadW hi, do you have some time to check this PR?)

@VerachadW VerachadW merged commit c1e689d into VerachadW:develop Nov 22, 2018
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

Successfully merging this pull request may close these issues.

7 participants