Skip to content

wip: Chore/templates

Hadrien Froger requested to merge chore/templates into main

reserve a domain names

  • add a reserved subdomains model, linked to a user (user, endsWith)
  • add a graphql query:
query checksubdomain {
  checkSubdomain(subdomain:"hello.demo") {
  available
  }
}

Exemple:

  • me (hello@voca.city) have a reserved subdomain ".demo"
  • the frontend asks the back about hello.demo for another user, will returns false.
  • the frontend asks the back about hello.demo for me, will returns true.

templates

  • add a Query.templates
  • add a privateTo field to be able to select templates exclusivity for a user
  • add a policy to be transparent to the frontend
  • fields:
  • title: template title
  • templateName: template identifier to pass to instance creation
  • description: template description
  • version: some indication on maturity, internals only for now
  • supportedLocalesCSV: a comma-separated value of supported locales. ex: fr,fr-CA,fr-CH,en,en-GB,en-US
  • privateTo the user the template is private. Always return or null or the current user.
query listTemplates {
  templates (filters:{privateTo:null }) {
  	data{
      attributes{
        title
        templateName
        description
        version
        supportedLocalesCSV
        privateTo { 
        	data {
            id
          }
        }
      }
    }
  }
}
Edited by Hadrien Froger

Merge request reports

Loading