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 support for GraphQL API for Strapi #2269

Open
wants to merge 21 commits into
base: main
Choose a base branch
from

Conversation

msquance-stem
Copy link
Contributor

@msquance-stem msquance-stem commented Jan 27, 2025

Status

Review progress:

  • Browser tested
  • Front-end review completed
  • Tech review completed

What's changed?

  • Created new client and connection for GraphQL
  • Created new base client that handles data processing for both APIs (REST and GraphQL)
  • Added conversion function in the factory to handle the different naming convention in of components and convert them to match the REST version
  • New query system that holds the GraphQL for each component. There is an alias system to handle the fact that we have used the same name for attributes that have different definitions, prime example is title, which is often used by sometimes is optional. To deal with this you can add an alias on the front of the attribute and separate it with a double underscore (__), we just drop the first bit, so the latter just needs to be the name of the attribute

Steps to perform after deploying to production

If the production environment requires any extra work after this PR has been deployed detail it here. This could be running a Rake task, migrating a DB table, or upgrading a Gem. That kind of thing.

@msquance-stem msquance-stem temporarily deployed to teachcomputing-pr-2269 January 28, 2025 09:59 Inactive
@tc-deploybot tc-deploybot temporarily deployed to teachcomputing-pr-2269 January 28, 2025 12:56 Inactive
@tc-deploybot tc-deploybot temporarily deployed to teachcomputing-pr-2269 January 28, 2025 13:11 Inactive
@tc-deploybot tc-deploybot temporarily deployed to teachcomputing-pr-2269 January 28, 2025 13:51 Inactive
@msquance-stem msquance-stem changed the title Add support for GraphQL API for Starpi Add support for GraphQL API for Strapi Jan 28, 2025
@tc-deploybot tc-deploybot temporarily deployed to teachcomputing-pr-2269 January 28, 2025 15:03 Inactive
@msquance-stem msquance-stem temporarily deployed to teachcomputing-pr-2269 January 29, 2025 09:30 Inactive
@msquance-stem msquance-stem temporarily deployed to teachcomputing-pr-2269 January 29, 2025 09:55 Inactive
@msquance-stem msquance-stem temporarily deployed to teachcomputing-pr-2269 January 29, 2025 13:21 Inactive
@msquance-stem msquance-stem temporarily deployed to teachcomputing-pr-2269 January 29, 2025 14:53 Inactive
@msquance-stem msquance-stem temporarily deployed to teachcomputing-pr-2269 January 29, 2025 15:09 Inactive
@msquance-stem msquance-stem temporarily deployed to teachcomputing-pr-2269 January 29, 2025 15:20 Inactive
@msquance-stem msquance-stem temporarily deployed to teachcomputing-pr-2269 January 29, 2025 15:27 Inactive
@msquance-stem msquance-stem temporarily deployed to teachcomputing-pr-2269 January 29, 2025 15:42 Inactive
@msquance-stem msquance-stem temporarily deployed to teachcomputing-pr-2269 January 29, 2025 15:54 Inactive
@msquance-stem msquance-stem temporarily deployed to teachcomputing-pr-2269 January 29, 2025 16:30 Inactive
Probably needs a bit of tidying up, but its a working start.
Still need to implement all the different grahql queries
…in some extra testing of the older rest features in case we still need them

Added some changes to the graphql base query to include generation of filter and sort params.

Updated the filter factory to support the rest mode (prepended $ sign) and the graphql mode.
Fixed sorting issue on blogs
Setup a loop on the search index job, as to deal with the fact that graphql limits to 100
Updated tests to check this loop
@msquance-stem msquance-stem temporarily deployed to teachcomputing-pr-2269 February 3, 2025 12:49 Inactive
Copy link

sonarqubecloud bot commented Feb 3, 2025

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants