Skip to content
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

Add graphql types to the Seo module #11213

Conversation

dannyd89
Copy link
Contributor

@dannyd89 dannyd89 commented Feb 18, 2022

This PR fixes #11199

Added ObjectGraphTypes for SeoMetaPart and needed to add one for MetaEntry, too.
I'm not sure if OrchardCore.Seo is the right place for the ObjectGraphType for MetaEntry though, so I would like some feedback on that.

Rest is working fine:
image

@dnfadmin
Copy link

dnfadmin commented Feb 18, 2022

CLA assistant check
All CLA requirements met.

@dannyd89 dannyd89 marked this pull request as draft February 21, 2022 15:58
@dannyd89 dannyd89 marked this pull request as ready for review March 2, 2022 11:02
@dannyd89
Copy link
Contributor Author

dannyd89 commented Mar 2, 2022

@sebastienros Dont who to ping to look at this but I think it's somewhat in a reviewable state now

@hishamco
Copy link
Member

hishamco commented Mar 2, 2022

@dannyd89 is your PR ready or still WIP?

@dannyd89
Copy link
Contributor Author

dannyd89 commented Mar 2, 2022

@hishamco I removed the WIP label, this is ready for PR


namespace OrchardCore.Seo.GraphQL;

public class SeoMetaPartIndexAliasProvider : IIndexAliasProvider
Copy link
Contributor

@Skrypt Skrypt Mar 2, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it used in your custom code to retrieve the Indices names available to Query?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should I remove this? I just saw it being used in AutoPart for indexing thats why I created one for SeoMeta too

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You don't need to index these. There is no reason to query a content item by these properties IMO.


namespace OrchardCore.Seo.Indexes;

public class SeoMetaPartContentIndexHandler : IContentItemIndexHandler
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, I don't really see when I will require to search in Lucene a Seo meta title. Though, can be useful if needed.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it's fine to add it in the indices, might help for the full text search.

@Skrypt
Copy link
Contributor

Skrypt commented Mar 2, 2022

Also I'm not sure how to make the SeoMetaPart fields queriable since I'm getting an exception in GraphiQL currently.
Do I need to add an IndexAliasProvider in the same fashion as for example AutoroutePart has one?

I'm not sure about that one, need to ask @carlwoodhouse but that would definitely make sense.

@dannyd89
Copy link
Contributor Author

dannyd89 commented Mar 2, 2022

Also I'm not sure how to make the SeoMetaPart fields queriable since I'm getting an exception in GraphiQL currently.
Do I need to add an IndexAliasProvider in the same fashion as for example AutoroutePart has one?

I'm not sure about that one, need to ask @carlwoodhouse but that would definitely make sense.

This one is already fixed with the current commit, I'll work on your feedback as soon as I have some time on my hand, thanks

@agriffard agriffard changed the title 11199: Added graphql types to the Seo module Add graphql types to the Seo module Mar 3, 2022

namespace OrchardCore.Seo.GraphQL;

public class SeoMetaPartIndexAliasProvider : IIndexAliasProvider
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You don't need to index these. There is no reason to query a content item by these properties IMO.


namespace OrchardCore.Seo.Indexes;

public class SeoMetaPartContentIndexHandler : IContentItemIndexHandler
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it's fine to add it in the indices, might help for the full text search.

src/OrchardCore.Modules/OrchardCore.Seo/Migrations.cs Outdated Show resolved Hide resolved
@dannyd89
Copy link
Contributor Author

dannyd89 commented Apr 4, 2022

@sebastienros I addressed your feedback and removed all the indexing etc

@dannyd89
Copy link
Contributor Author

I recreated the internal SEO module with my code as an own module and we are currently using it successfully. Is there still something I can do to close this? Else we will stick with our own module.

@Skrypt
Copy link
Contributor

Skrypt commented May 31, 2022

Waiting on release 1.4 before anything.

@dannyd89
Copy link
Contributor Author

Waiting on release 1.4 before anything.

Thanks for the reply, I'll wait and continue to use my module then for the time being

@ThiemeNL
Copy link
Contributor

Hi is there any progress on this issue? I would be very nice to have these fields in graphql? Maybe I can help to resolve the merge conflicts if you like to.

@dannyd89
Copy link
Contributor Author

I was still waiting on approvement for this, I would be happy if this PR could resolved/merged at some point

@hishamco
Copy link
Member

I was still waiting on approvement for this, I would be happy if this PR could resolved/merged at some point

Done!!

@nerd3717
Copy link

GeoPointField also have same problems

@hishamco
Copy link
Member

Please resolve the conflict

@dannyd89 dannyd89 closed this Aug 10, 2023
@dannyd89 dannyd89 force-pushed the dannyd89/11199-seo-module-add-graphql-types branch from 6ce580d to 11b9cc7 Compare August 10, 2023 12:31
@hishamco
Copy link
Member

Closed?!!

@dannyd89 dannyd89 reopened this Aug 10, 2023
@dannyd89
Copy link
Contributor Author

Sorry for the confusion, should be good now

@sebastienros sebastienros enabled auto-merge (squash) August 10, 2023 17:53
@sebastienros sebastienros merged commit 639e72e into OrchardCMS:main Aug 10, 2023
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Seo Module: Many fields dont appear in the GraphQL API
8 participants