-
Notifications
You must be signed in to change notification settings - Fork 13
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
Problem building against WPGrapQL #92
Comments
I believe this might be an issue with enums. The schema contains enums that begin with _ which are the 14 errors in the generated source code. enum MediaItemSizeEnum { |
This is sdl version of the schema. |
I have fixed the issue with the enums(6.2.0-preview.3), but as you showed, it now fails with interfaces. Some fields in the schema have additional arguments compared to those defined in interfaces. I will have a look later today. |
I appreciate that. |
Hello, are you making progress? |
I fixed the situation that was responsible for the first two issues. However, there is another issue. The schema contains the interfaces |
How do you get this schema? Looks like it is broken. There are interfaces that are not explicitly "implemented". For example, The same issue was with |
Nevermind. You already mentioned it in the initial description. |
Thanks for staying on this. Wordpress has various 'post' types, including 'post' and 'pages' by default. The EditorBlock interface is provided by a 3rd party plugin which adds graphql functionality for one of the core features of wordpress, the Gutenberg Block editor, which allows users to assemble their content using modules/bocks r: https://github.com/wpengine/wp-graphql-content-blocks/tree/main This explains why the different interfaces.... They are used to determine under which contexts (post, page, etc..) they can be used. Probably to not allow them to appear on post types not supported by the Gutenberg editor and related enabled post types in the main graphql plugin. |
So though they each have the same properties, the interfaces are only being used as markers. |
Describe the bug
This appears to be an issue similar or the same I had with StrawberryShake against the same schema source.
How to Reproduce
Create a Wordpress website: download free app https://localwp.com/ to create a local wordpress installation.
Install the WPGraphQL plugin: https://wordpress.org/plugins/wp-graphql
Go through zeroql setup steps, and when reaching the build step, build fails with 14 errors:
f:\qlclient\obj\ZeroQL\config.zeroql.json.g.cs(78909,43): error CS1001: Identifier expected [f:\qlclient\qlclient.csproj]
f:\qlclient\obj\ZeroQL\config.zeroql.json.g.cs(78909,43): error CS1003: Syntax error, ',' expected [f:\qlclient\qlclient.csproj]
f:\qlclient\obj\ZeroQL\config.zeroql.json.g.cs(78910,13): error CS1003: Syntax error, ',' expected [f:\qlclient\qlclient.csproj]
f:\qlclient\obj\ZeroQL\config.zeroql.json.g.cs(78911,43): error CS1001: Identifier expected [f:\qlclient\qlclient.csproj]
f:\qlclient\obj\ZeroQL\config.zeroql.json.g.cs(78911,43): error CS1003: Syntax error, ',' expected [f:\qlclient\qlclient.csproj]
f:\qlclient\obj\ZeroQL\config.zeroql.json.g.cs(78912,13): error CS1003: Syntax error, ',' expected [f:\qlclient\qlclient.csproj]
f:\qlclient\obj\ZeroQL\config.zeroql.json.g.cs(83231,958): error CS1003: Syntax error, ',' expected [f:\qlclient\qlclient.csproj]
f:\qlclient\obj\ZeroQL\config.zeroql.json.g.cs(83231,964): error CS1003: Syntax error, ',' expected [f:\qlclient\qlclient.csproj]
f:\qlclient\obj\ZeroQL\config.zeroql.json.g.cs(83231,1033): error CS1003: Syntax error, ',' expected [f:\qlclient\qlclient.csproj]
f:\qlclient\obj\ZeroQL\config.zeroql.json.g.cs(83231,1039): error CS1003: Syntax error, ',' expected [f:\qlclient\qlclient.csproj]
f:\qlclient\obj\ZeroQL\config.zeroql.json.g.cs(83231,1775): error CS1003: Syntax error, ',' expected [f:\qlclient\qlclient.csproj]
f:\qlclient\obj\ZeroQL\config.zeroql.json.g.cs(83231,1781): error CS1003: Syntax error, ',' expected [f:\qlclient\qlclient.csproj]
f:\qlclient\obj\ZeroQL\config.zeroql.json.g.cs(83231,1850): error CS1003: Syntax error, ',' expected [f:\qlclient\qlclient.csproj]
f:\qlclient\obj\ZeroQL\config.zeroql.json.g.cs(83231,1856): error CS1003: Syntax error, ',' expected [f:\qlclient\qlclient.csproj]
Expected behavior
A Successful build
schema.zip
The GraphqQL schema that fails
Attached as zipfile
Screenshots
Environment (please complete the following information):
Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered: