-
-
Notifications
You must be signed in to change notification settings - Fork 129
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
Functions with arguments that are arrays of custom types are not parsed correctly #83
Comments
Can you provide a minimal pg_dump that reproduces this? The issue most likely exists in this file, in that we cannot find or build a GraphQL type to match the PostgreSQL one: |
See also ReturnType in this file: |
Thanks I will try and get a minimal dump that reproduces the problem and have a look at those files |
This should be enough to reproduce the error with the createScheduledPost mutation |
We can rule out graphile/crystal#580 at least; so that's good news!
So both the array type and the non-array type are present and introspectable. I'm going to flag this as a bug and look into it when I get a chance 👍 |
Thanks will have a look at it later myself as well |
If you use Node 8.5 then you can stick a |
Working on this currently. Almost have it sorted. |
Well... I have it sorted if the table and the columns and the types are all defined in one of the schemas you're exporting. If not it gets a little more... interesting. Currently looking into adding recursive CTEs into our introspection query 😳 |
Work in progress is here. I've not pushed the recursive query yet as it's not working. |
@cookejames Sorry about the delay on this! I think it's fixed now, just waiting for tests to pass. |
I have a similar problem, but with subtype of range type: CREATE TYPE app.foo AS RANGE (subtype = float8, subtype_diff = float8mi);
CREATE FUNCTION app.set_employee_schedule_for_day(array_of_foo app.foo[])
/* ... */ So, postgraphile: "4.0.0-beta.10" |
Please file as a fresh issue 👍 |
Here there are two arguments
newPostContents
andschedulesWithOptimal
that are arrays of a custom types however they are shown as typestring
. Custom types that aren't arrays such asinteractionType
are interpreted correctly.Do you have any suggestion where to start looking at the schema parsing code to fix this?
![mutation](https://user-images.githubusercontent.com/2211370/30874670-f6fa0a44-a2e8-11e7-88a5-4dc3e150fd9a.png)
![function](https://user-images.githubusercontent.com/2211370/30874687-ff43a138-a2e8-11e7-81ba-44a571654ba4.png)
The text was updated successfully, but these errors were encountered: