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

feat(inflector): split rowByUniqueKeys from singleRelationByKeys #72

Merged
merged 2 commits into from Sep 19, 2017

Conversation

Projects
None yet
2 participants
@EyMaddis
Contributor

EyMaddis commented Sep 14, 2017

The inflector function singleRelationByKeys does not only change the names for related elements on an object, e.g.

user {
  postsByUserId { // <--
    ....
  }
}

but also for queries that are based on unique columns, e.g. userByEmail().
This PR splits it up into two functions.

Please note that I was not able to build this locally, the changes seemed to be ignored.
I followed the instructions from the README.md, but had to run yarn in the directory of all packages.

@benjie

This comment has been minimized.

Show comment
Hide comment
@benjie

benjie Sep 14, 2017

Member

Sorry yeah you have to run npm watch; this is something I plan to solve in future. It's due to the whole node8plus vs node7minus stuff.

Member

benjie commented Sep 14, 2017

Sorry yeah you have to run npm watch; this is something I plan to solve in future. It's due to the whole node8plus vs node7minus stuff.

@EyMaddis

This comment has been minimized.

Show comment
Hide comment
@EyMaddis

EyMaddis Sep 14, 2017

Contributor

I use npm run watch, but running lerna run test will throw Cannot find module 'graphql-parse-resolve-info' from 'makeNewBuild.js'.

Contributor

EyMaddis commented Sep 14, 2017

I use npm run watch, but running lerna run test will throw Cannot find module 'graphql-parse-resolve-info' from 'makeNewBuild.js'.

@benjie

This comment has been minimized.

Show comment
Hide comment
@benjie

benjie Sep 14, 2017

Member

What version of yarn are you using? Try it with 1.0.0

Member

benjie commented Sep 14, 2017

What version of yarn are you using? Try it with 1.0.0

@benjie

benjie approved these changes Sep 19, 2017

Thanks!

@benjie benjie changed the title from do not reuse singleRelationByKeys for getting unique rows to feat(inflector): split rowByUniqueKeys from singleRelationByKeys Sep 19, 2017

@EyMaddis

This comment has been minimized.

Show comment
Hide comment
@EyMaddis

EyMaddis Sep 19, 2017

Contributor

Try it with 1.0.0

By the way: this works. Thanks

Contributor

EyMaddis commented Sep 19, 2017

Try it with 1.0.0

By the way: this works. Thanks

@benjie benjie merged commit 46e88dd into graphile:master Sep 19, 2017

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
@benjie

This comment has been minimized.

Show comment
Hide comment
@benjie

benjie Sep 19, 2017

Member

Merged 🙏 - beware I renamed the inflector to be plural.

Member

benjie commented Sep 19, 2017

Merged 🙏 - beware I renamed the inflector to be plural.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment