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 support for the passThrough argument of the cypher directive. #195

Merged
merged 1 commit into from
Apr 14, 2021

Conversation

Andy2003
Copy link
Collaborator

The new argument passThrough of the @cypher directive allows the user to return an arbitrary result for the directive

resolves #190

@n2iw
Copy link

n2iw commented Mar 31, 2021

Thanks @Andy2003! passThrough is mostly working now! There is only one small thing, there is no "projection" based on request for the embedded Map/Object. For example, one of my embedded object is called "files" it has 10 properties in Neo4j, but the request only asked one of them, the result is we are still returning all 10 properties for "files". It was processed correctly in Neo4j-GraphQL plugin. Can we have that capability added? Thanks a lot!

@Andy2003
Copy link
Collaborator Author

Andy2003 commented Apr 1, 2021

@n2iw

I guess you are using the Translator directly instead of letting graphql resolve the data via the dataFetchingInterceptor. If you call your schema as demonstrated in https://github.com/neo4j-graphql/neo4j-graphql-java/blob/0f89393884914e906de9d78c1e432b5a09a2ce53/core/src/test/kotlin/DataFetcherInterceptorDemo.kt you should get the projected fields returned

@n2iw
Copy link

n2iw commented Apr 13, 2021

@Andy2003

Yes, we are using the translator directly at the moment. We'll change our code to use DataFetchInterceptor as you suggested. I think this PR should be working fine for us. Thank you so much for solving this issue for us, we really appreciate it! Hope this PR gets merged and released soon!

@Andy2003 Andy2003 force-pushed the feature/gh-190-directive-result-pass-through branch from 6acf6d5 to eabc147 Compare April 14, 2021 08:11
@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

@Andy2003 Andy2003 force-pushed the feature/gh-190-directive-result-pass-through branch from 41beb6a to 6993c7b Compare April 14, 2021 11:14
@github-actions

This comment has been minimized.

The new argument `passThrough` of the `@cypher` directive allows the user to return an arbitrary result for the directive

resolves #190
@Andy2003 Andy2003 force-pushed the feature/gh-190-directive-result-pass-through branch from 6993c7b to 5a0ff41 Compare April 14, 2021 13:09
@github-actions

This comment has been minimized.

@Andy2003 Andy2003 merged commit bc88551 into master Apr 14, 2021
@github-actions
Copy link

Unit Test Results

    4 files  ±0      4 suites  ±0   29s ⏱️ ±0s
  71 tests ±0    71 ✔️ ±0  0 💤 ±0  0 ❌ ±0 
602 runs  ±0  600 ✔️ ±0  2 💤 ±0  0 ❌ ±0 

Results for commit bc88551. ± Comparison against base commit bc88551.

@Andy2003 Andy2003 deleted the feature/gh-190-directive-result-pass-through branch April 15, 2021 14:18
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.

Please add passThrough=true support!
2 participants