amazeelabs / silverback_campaign_urls
Allows creating campaign url entities that can be afterwards exposed via graphql, as redirects.
Installs: 4 090
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 6
Forks: 0
Open Issues: 1
Type:drupal-module
README
The Silverback campaign urls module allows the Drupal admins to create campaign urls. These are basically redirects that have no restriction for the source and the destination fields, meaning that the admin can input any kind of strings into them.
These campaign urls are stored as Drupal entities, and they can be retrieved using graphql in a Gatsby app for example. An example can be found in the silverback-gatsby app (check the gatsby-node.ts file).
The endpoint to administer these redirects is /admin/config/search/campaign_url
Gatsby integration
The modules contains a schema extension plugin that can be enabled on the GraphQL server. This schema extension contains a new GraphQL type called CampaignUrl which will be added to the schema when the extension is enabled on the GraphQL server. When this is done, the gatsby-source-silverback npm package will fetch these entities and create redirects for them.
Usually, in the Gatsby app, there should be an integaration with a sepcific hosting provider, like gatsby-plugin-netlify for netlify which should create the redirects in a specific file and format.