Skip to content

Commit

Permalink
Merge pull request #7 from SocialGouv/develop
Browse files Browse the repository at this point in the history
release v0.0.1
  • Loading branch information
alebret authored Aug 27, 2021
2 parents 63d283d + bc1b8d6 commit 5278ce3
Show file tree
Hide file tree
Showing 59 changed files with 15,143 additions and 354 deletions.
2 changes: 2 additions & 0 deletions .env.development
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
API_URL=https://backoffice-preprod-les1000jours.dev.fabrique.social.gouv.fr
EMAIL_CONTACT=[email protected]
2 changes: 2 additions & 0 deletions .env.production
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
API_URL=
EMAIL_CONTACT=
66 changes: 66 additions & 0 deletions apollo-client.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
import { ApolloClient, InMemoryCache, gql } from "@apollo/client";

export const client = new ApolloClient({
uri: `${process.env.API_URL}/graphql?nocache`,
cache: new InMemoryCache(),
headers: { "content-type": "application/json" },
});

export const QUESTIONNAIRE_EPDS = gql`
query QuestionnaireEpds {
questionnaireEpds {
libelle,
ordre,
locale,
reponse_1_libelle,
reponse_1_points,
reponse_2_libelle,
reponse_2_points,
reponse_3_libelle,
reponse_3_points,
reponse_4_libelle,
reponse_4_points,
}
}`;

export const EPDS_ADD_RESPONSE = gql`
mutation (
$genre: ENUM_REPONSESEPDS_GENRE!
$compteur: Int!
$score: Int!
$reponseNum1: Int!
$reponseNum2: Int!
$reponseNum3: Int!
$reponseNum4: Int!
$reponseNum5: Int!
$reponseNum6: Int!
$reponseNum7: Int!
$reponseNum8: Int!
$reponseNum9: Int!
$reponseNum10: Int!
) {
createReponsesEpd(
input: {
data: {
genre: $genre
compteur: $compteur
score: $score
reponse_1: $reponseNum1
reponse_2: $reponseNum2
reponse_3: $reponseNum3
reponse_4: $reponseNum4
reponse_5: $reponseNum5
reponse_6: $reponseNum6
reponse_7: $reponseNum7
reponse_8: $reponseNum8
reponse_9: $reponseNum9
reponse_10: $reponseNum10
}
}
) {
reponsesEpd {
id
created_at
}
}
}`;
6 changes: 6 additions & 0 deletions next-i18next.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
module.exports = {
i18n: {
defaultLocale: 'fr-FR',
locales: ['fr-FR'],
},
}
17 changes: 17 additions & 0 deletions next.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
const { i18n } = require('./next-i18next.config')

module.exports = {
i18n,
async redirects() {
return [
{
source: '/',
destination: '/comprendre-test',
permanent: true,
},
]
},
env: {
API_URL: process.env.API_URL
}
}
Loading

0 comments on commit 5278ce3

Please sign in to comment.