drupal-graphql / graphql-views

11 stars 18 forks source link

Don't create an Enum type for views sort it it is empty. #9

Closed mkhamash closed 6 years ago

mkhamash commented 6 years ago

Stopping ViewSortByDeriver from creating an empty ENUM type, since this would cause an error in GraphQL explore.

Uncaught Error: .......ViewSortBy values must be an object with value names as keys.
"kind":"ENUM",
"name":"....ViewSortBy",
"description":"",
"fields":null,
"inputFields":null,
"interfaces":null,
"enumValues":[
],
"possibleTypes":null
codecov[bot] commented 6 years ago

Codecov Report

Merging #9 into 8.x-1.x will increase coverage by 0.03%. The diff coverage is 100%.

Impacted file tree graph

@@           Coverage Diff            @@
##           8.x-1.x    #9      +/-   ##
========================================
+ Coverage    76.96%   77%   +0.03%     
========================================
  Files           23    23              
  Lines          699   700       +1     
========================================
+ Hits           538   539       +1     
  Misses         161   161
Impacted Files Coverage Δ
src/Plugin/Deriver/Enums/ViewSortByDeriver.php 95.23% <100%> (+0.23%) :arrow_up:

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 ebd2fcf...3d4b4c5. Read the comment docs.

fubhy commented 6 years ago

Thanks!