-
Notifications
You must be signed in to change notification settings - Fork 13
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
feat: la configuration applicative est une constante #1184
feat: la configuration applicative est une constante #1184
Conversation
✅ Deploy Preview for stylo-docs canceled.
|
✅ Deploy Preview for stylo-dev ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
Permet d'utiliser `applicationConfig.graphqlEndpoint` uniquement au niveau du `fetch`.
f42a0bc
to
b167083
Compare
@thom4parisot est-ce qu'on fusionne sur master ? ou est-ce que tu vois une "contre-indication" ? |
C'est ok ; j'ai juste pas testé les écrans concernés par le changement. Y'a une raison de ne pas utiliser directement les constantes aux endroits concernés ? (plutôt que de créer un store dont les données ne changent pas) |
👍🏻
C'est uniquement pour centraliser la configuration applicative. Il n'y a de store que le nom, on exporte juste les constantes : // variables defined statically via vite.config.js
export const applicationConfig = {
backendEndpoint: __BACKEND_ENDPOINT__,
graphqlEndpoint: __GRAPHQL_ENDPOINT__,
exportEndpoint: __EXPORT_ENDPOINT__,
processEndpoint: __PROCESS_ENDPOINT__,
pandocExportEndpoint: __PANDOC_EXPORT_ENDPOINT__,
humanIdRegisterEndpoint: __HUMANID_REGISTER_ENDPOINT__,
websocketEndpoint: toWebsocketEndpoint(__BACKEND_ENDPOINT__),
} Tu aurais vu ça comment ? Utiliser directement |
Permet d'utiliser
applicationConfig.graphqlEndpoint
uniquement au niveau dufetch
.