-
Notifications
You must be signed in to change notification settings - Fork 35
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
Use virtualAttributes for GraphQL schema #44
Comments
Hi @timbaas . This library utilizes Objection Model JSON schema to generate GraphQL fields. On the other hand, as you mentioned, if the field is a part of the schema it is supposed to exist in the db. So, virtual attributes are not supported yet, but I think it's worth implementing in the future. |
I just submitted a pull request which should facilitate this need: #55 |
Ignore... I found PR #57 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi there,
I can't find any way to get around the following.
I've got a Model ("Exchange") with a db column ("name") and a virtual attribute ("marketCount"):
When defining "marketCount" in jsonSchema properties it tries to select the column from the db, which of course doesn't exist and when leaving it out it isn't available in the GraphQL Schema, so the query fails.
I find it hard to believe this wouldn't be possible but didn't find the answer either.
Anything I don't know of?
The text was updated successfully, but these errors were encountered: