You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have encountered several issues while installing and using the frappe_graphql app with Frappe version 15. I wanted to bring these to your attention in hopes that they can be addressed to improve compatibility with the latest Frappe version.
Issues Encountered:
Interface Field Mismatch:
Description: When generating SDL files, the BaseDocType interface includes fields (parent, parentfield, parenttype) that are not present in non-child DocTypes, leading to GraphQL validation errors.
Error Messages:
Interface field BaseDocType.parent expected but Zone does not provide it.
Interface field BaseDocType.parentfield expected but Zone does not provide it.
Interface field BaseDocType.parenttype expected but Zone does not provide it.
Resolution Attempted: Modified the SDL generation code to conditionally include parent fields only for child DocTypes (istable is True), and adjusted the interfaces accordingly.
Duplicate Type and Field Definitions:
Description: After adjusting the SDL generation code, encountered errors indicating that types and fields are defined multiple times in the schema.
Error Messages:
TypeError: Enum value 'KanbanBoardColumnIndicatorSelectOptions.RED' can only be defined once.
There can be only one type named 'BaseDocType'.
Field 'BaseDocType.doctype' can only be defined once.
Field 'BaseDocType.name' can only be defined once.
Field 'BaseDocType.owner' can only be defined once.
...
Cause: The interface definitions (BaseDocType and ChildDocType) and certain enums are being included multiple times in the generated SDL files.
Resolution Attempted: Adjusted the code to ensure that interface definitions and enums are included only once.
Compatibility Issues with Frappe Version 15:
Description: The frappe_graphql app seems to have multiple compatibility issues when used with Frappe version 15. This includes changes in the underlying Frappe framework that affect how DocTypes and fields should be handled in the GraphQL schema.
Steps to Reproduce:
Install Frappe version 15.
Install the frappe_graphql app.
Generate SDL files using the command:
bench --site your_site_name graphql generate_sdl
Start the bench and attempt to execute a GraphQL query.
Expected Behavior:
The GraphQL endpoint should be operational without schema validation errors.
Actual Behavior:
Encountered multiple errors related to interface implementation mismatches and duplicate definitions in the GraphQL schema.
Additional Information:
The issues seem to stem from changes in Frappe version 15 that are not yet accommodated in the frappe_graphql codebase.
Modifications were made to the doctype.py file to adjust the SDL generation logic, but further issues arose.
Suggestions:
Update the frappe_graphql app to ensure compatibility with Frappe version 15.
Review the SDL generation code to prevent duplicate type and enum definitions.
Consider conditionally including fields and interfaces based on the DocType's properties (istable, issingle, etc.).
Conclusion:
The frappe_graphql app is a valuable tool for integrating GraphQL with Frappe, but currently faces significant compatibility issues with the latest version of Frappe. Addressing these issues will greatly enhance its usability and reliability.
Please let me know if I can provide any further information or assist with testing.
Thank you for your attention to this matter.
Summary
Explanation: The errors are caused by duplicate definitions of types, interfaces, and enums in the generated GraphQL schema.
Solution: Adjust the SDL generation code to ensure that interfaces and enums are defined only once, and that fields are included appropriately based on the DocType's characteristics.
GitHub Issue: Provided a detailed issue report to help the developers understand and address the problems encountered when using frappe_graphql with Frappe version 15.
The text was updated successfully, but these errors were encountered:
Dear frappe_graphql Developers,
I have encountered several issues while installing and using the
frappe_graphql
app with Frappe version 15. I wanted to bring these to your attention in hopes that they can be addressed to improve compatibility with the latest Frappe version.Issues Encountered:
Interface Field Mismatch:
BaseDocType
interface includes fields (parent
,parentfield
,parenttype
) that are not present in non-child DocTypes, leading to GraphQL validation errors.parent
fields only for child DocTypes (istable
isTrue
), and adjusted the interfaces accordingly.Duplicate Type and Field Definitions:
BaseDocType
andChildDocType
) and certain enums are being included multiple times in the generated SDL files.Compatibility Issues with Frappe Version 15:
frappe_graphql
app seems to have multiple compatibility issues when used with Frappe version 15. This includes changes in the underlying Frappe framework that affect how DocTypes and fields should be handled in the GraphQL schema.Steps to Reproduce:
frappe_graphql
app.Expected Behavior:
Actual Behavior:
Additional Information:
frappe_graphql
codebase.doctype.py
file to adjust the SDL generation logic, but further issues arose.Suggestions:
frappe_graphql
app to ensure compatibility with Frappe version 15.istable
,issingle
, etc.).Conclusion:
The
frappe_graphql
app is a valuable tool for integrating GraphQL with Frappe, but currently faces significant compatibility issues with the latest version of Frappe. Addressing these issues will greatly enhance its usability and reliability.Please let me know if I can provide any further information or assist with testing.
Thank you for your attention to this matter.
Summary
frappe_graphql
with Frappe version 15.The text was updated successfully, but these errors were encountered: