-
-
Notifications
You must be signed in to change notification settings - Fork 225
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
Relationships (ie ID) #39
Comments
@jamesc892 It's very hard to generate "sane" data in a tool that doesn't know your application logic.
|
Yeah I agree that sane data in its entirety would be out of scope. But for one off relationships, maybe not so much? For context, we are trying to have on the fly introspection of our schema, and dynamically render faked data to avoid the need for engineers to do much from a configuration sense. Thinking thru the manual approach of restricting IDs and writing a minimal server to help were both scenarios we thought of, however they became a little too manual. We were hoping there was a flag that we could generate on our introspected schema to not rely on much static definition as we have a pretty robust API. We hoped something like a decorator We'll reconvene here, and possibly throw you a PR if we think thru an aliased relationship approach, if that sounds interesting to you. |
@jamesc892 If you can suggest some general mechanism that would be useful to other users then I have no problem merging your PR or implementing it myself. At the moment it hard for me to understand your proposal so can you please describe your setup step by step:
|
Is there anyway to mock relationships? We have a use case where two seperate queries have an ID field, which in our production implementation actually would be the same, and we do some transformative work to lookup by matching IDs.
ie.
Currently faker randomizes IDs, but there seems to be no way to specify if a relationship should exist so that we can develop against "sane" faked data.
Hopefully that's clear enough, wondering if there is a solution for this kind of scenario.
The text was updated successfully, but these errors were encountered: