Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Improve remote resource behavior #121

Merged
merged 1 commit into from
Mar 30, 2019
Merged

Conversation

richmolj
Copy link
Contributor

  • Previously, we'd disallow all writes. Now we allow associating to an
    existing remote entity (only applies to `belongs_to).
  • Previously, we'd avoid links for remote resources. Now, we avoid link
    validation (because we can't validate a remote API), but still generate
    the links (you can of course always turn this off).
  • As part of the last point, improved foreign key inferrence. We usually
    infer FK via the model name, but for remote resources the model is
    OpenStruct so we should use the resource name instead.

@richmolj
Copy link
Contributor Author

@wadetandy heads up

* Previously, we'd disallow all writes. Now we allow associating to an
existing remote entity (only applies to `belongs_to).
* Previously, we'd avoid links for remote resources. Now, we avoid link
validation (because we can't validate a remote API), but still generate
the links (you can of course always turn this off).
* As part of the last point, improved foreign key inferrence. We usually
infer FK via the model name, but for remote resources the model is
OpenStruct so we should use the resource name instead.
@richmolj richmolj merged commit 7ab1221 into graphiti-api:master Mar 30, 2019
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant