-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
Collapsed fields collision in graphql #13927
Collapsed fields collision in graphql #13927
Conversation
# Conflicts: # src/OrchardCore.Modules/OrchardCore.ContentFields/GraphQL/Fields/ContentFieldsProvider.cs # src/OrchardCore.Modules/OrchardCore.ContentFields/GraphQL/Fields/ObjectGraphTypeFieldProvider.cs
….com:lampersky/OrchardCore into lampersky/collapsed-fileds-collision-graphql
@sebastienros whenever you have time, please have a look into this PR, also here quick video was added to present those changes in PartSettings |
This pull request has merge conflicts. Please resolve those before requesting a review. |
# Conflicts: # src/OrchardCore.Modules/OrchardCore.ContentFields/GraphQL/Fields/ObjectGraphTypeFieldProvider.cs
|
||
if (settings.PreventFieldNameCollision) | ||
{ | ||
return $"{partName.ToFieldName()}{fieldName.ToPascalCase()}"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No separators?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@sebastienros yes, no separator, partName.ToFieldName() is producing camelCase, fieldName.ToPascalCase() is producing PascalCase when concatenated you will get some user friendly fields
example:
partName: MyCustomPart
fieldName: MyCustomField
will produce: myCustomMyCustomField graphQL field
# Conflicts: # src/OrchardCore.Modules/OrchardCore.ContentFields/GraphQL/Fields/ObjectGraphTypeFieldProvider.cs
Do you want to get back to the review of this, @sebastienros? |
This pull request has merge conflicts. Please resolve those before requesting a review. |
|
||
public GraphQLContentTypePartSettingsDriver(IOptions<GraphQLContentOptions> optionsAccessor) | ||
public GraphQLContentTypePartSettingsDriver(IOptions<GraphQLContentOptions> optionsAccessor, IStringLocalizer<GraphQLContentTypePartSettingsDriver> stringLocalizer) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't see it used.
src/OrchardCore.Modules/OrchardCore.ContentFields/GraphQL/Fields/ContentFieldsProvider.cs
Outdated
Show resolved
Hide resolved
src/OrchardCore/OrchardCore.ContentManagement.GraphQL/Options/GraphQLContentOptions.cs
Outdated
Show resolved
Hide resolved
...rchardCore.Modules/OrchardCore.ContentTypes/Views/GraphQLContentTypePartSettings.Edit.cshtml
Outdated
Show resolved
Hide resolved
...OrchardCore.Modules/OrchardCore.ContentFields/GraphQL/Fields/ObjectGraphTypeFieldProvider.cs
Outdated
Show resolved
Hide resolved
@hyzx86 do you have any feedback on this PR? |
Please also merge soon before any conflicts can arise, if suitable. |
Can this be merged, then, Hisham? |
This pull request has merge conflicts. Please resolve those before requesting a review. |
third merge conflict resolved, hurry up guys 😛 |
So, I assume yes, this can be merged :D. Sorry about that, and thank you! |
fixes #13926