Skip to content
This repository has been archived by the owner on Sep 3, 2021. It is now read-only.

add FRAGMENT_TYPE when customQuery and customMutation resolve interfaces #296

Merged
merged 2 commits into from
Aug 28, 2019

Conversation

Carnewal
Copy link

Hi there

Currently we have our interfaces accompanied with a __resolveType resolver that checks for the FRAGMENT_TYPE field. Currently, when using a custom mutation or query with a cypher, the FRAGMENT_TYPE is not added to the result, whereas when using fragments it is.

This PR solves this inconsistency by adding the first label as the FRAGMENT_TYPE if the schema type is an interface, similar to how fragments are handled.

This is a followup to #270

@codecov-io
Copy link

codecov-io commented Aug 22, 2019

Codecov Report

Merging #296 into master will increase coverage by <.01%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #296      +/-   ##
==========================================
+ Coverage   95.04%   95.05%   +<.01%     
==========================================
  Files          10       10              
  Lines        2341     2345       +4     
==========================================
+ Hits         2225     2229       +4     
  Misses        116      116
Impacted Files Coverage Δ
src/utils.js 93.22% <100%> (+0.01%) ⬆️
src/translate.js 98.64% <100%> (ø) ⬆️

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 f806374...0d5170a. Read the comment docs.

@johnymontana
Copy link
Contributor

Looks good. Thanks, @Carnewal!

@johnymontana johnymontana merged commit 112f7e1 into neo4j-graphql:master Aug 28, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants