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

fix: update app event handler example to be frontendless app [EXT-6286] #9606

Merged
merged 3 commits into from
Mar 26, 2025

Conversation

whitelisab
Copy link
Contributor

@whitelisab whitelisab commented Mar 26, 2025

Purpose

Since creating the new function templates, some of our function examples were not working properly due to the sub-directory setup. This PR changes the App Event Handler Function example to be a single frontendless app example that can be bootstrapped via the CCA using npx create-contentful-app@latest --example function-appevent-handler.

Approach

Here is a summary of the changes:

  • Removed the TS/JS sub-directories in favor of a singular app example
  • This example has no frontend; the only code is for functions and some setup scripts
  • Add more details to the INSTRUCTIONS file, including how to use the scripts to easily get setup
  • Added a script for creating an app event subscription that links to the handler function and a script to create a content type and publish an entry to trigger the events that will be handled and sent by the handler
  • Bumped @contentful/node-apps-toolkit and use the FunctionTypeEnum

I also made two small updates to the filter example in this PR (updating one of the types and a docs update)

Testing steps

I tested this app locally and also via the CCA by pointing the local CCA to this branch. I ran through all the scripts in the instructions to ensure that they work properly.

Breaking Changes

None

Dependencies and/or References

Related PR for filter function example: #9602

Deployment

@whitelisab whitelisab requested a review from a team as a code owner March 26, 2025 17:07
Copy link

netlify bot commented Mar 26, 2025

Deploy Preview for ecommerce-app-base-components canceled.

Name Link
🔨 Latest commit c8d6050
🔍 Latest deploy log https://app.netlify.com/sites/ecommerce-app-base-components/deploys/67e4374eee57800008bd12ca

@mgoudy91 mgoudy91 merged commit fbbda78 into master Mar 26, 2025
17 checks passed
@mgoudy91 mgoudy91 deleted the fix/ext-6286-handler-func branch March 26, 2025 17:36
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