granddebat_proposal.sh 16 KB
Newer Older
Code for France's avatar
Code for France committed
1
curl -s 'https://granddebat.fr/graphql/internal' -H 'User-Agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:64.0) Gecko/20100101 Firefox/64.0' -H 'Accept: application/json' -H 'Accept-Language: fr,fr-FR;q=0.8,en-US;q=0.5,en;q=0.3' --compressed -H 'Referer: https://granddebat.fr/projects/la-transition-ecologique/collect/participez-a-la-recherche-collective-de-solutions-1/proposals/biodiversite' -H 'content-type: application/json' -H 'origin: https://granddebat.fr' -H 'DNT: 1' -H 'Connection: keep-alive' --data '{"operationName":"ProposalPageQuery","query":"query ProposalPageQuery(\n  $proposalId: ID!\n  $hasVotableStep: Boolean!\n  $stepId: ID!\n  $isAuthenticated: Boolean!\n) {\n  viewer @include(if: $isAuthenticated) {\n    ...ProposalPageTabs_viewer\n    ...ProposalPageHeader_viewer_4ESFbG\n    id\n  }\n  step: node(id: $stepId) @include(if: $hasVotableStep) {\n    __typename\n    ...ProposalPageHeader_step_39ngnn\n    ...ProposalPageTabs_step\n    id\n  }\n  proposal: node(id: $proposalId) {\n    __typename\n    ...ProposalDraftAlert_proposal\n    ...ProposalPageAlert_proposal\n    ...ProposalPageTabs_proposal\n    ...ProposalPageHeader_proposal_39ngnn\n    id\n  }\n}\n\nfragment ProposalPageTabs_viewer on User {\n  ...ProposalPageContent_viewer_4ESFbG\n}\n\nfragment ProposalPageHeader_viewer_4ESFbG on User {\n  ...ProposalVoteButtonWrapperFragment_viewer_Q37Wz @include(if: $hasVotableStep)\n}\n\nfragment ProposalPageHeader_step_39ngnn on ProposalStep {\n  ...ProposalVoteButtonWrapperFragment_step\n  ...ProposalVoteModal_step_39ngnn\n}\n\nfragment ProposalPageTabs_step on ProposalStep {\n  ...ProposalPageContent_step\n  form {\n    usingCategories\n    usingThemes\n    id\n  }\n}\n\nfragment ProposalDraftAlert_proposal on Proposal {\n  publicationStatus\n}\n\nfragment ProposalPageAlert_proposal on Proposal {\n  publicationStatus\n  trashedReason\n}\n\nfragment ProposalPageTabs_proposal on Proposal {\n  id\n  ...ProposalPageFollowers_proposal\n  ...ProposalPageEvaluation_proposal\n  ...ProposalFusionList_proposal\n  ...ProposalPageMetadata_proposal\n  ...ProposalPageLastNews_proposal\n  ...ProposalPageBlog_proposal\n  ...ProposalPageContent_proposal\n  ...ProposalPageAdvancement_proposal\n  ...ProposalPageVoteThreshold_proposal\n  allVotes: votes(first: 0) {\n    totalCount\n  }\n  news {\n    totalCount\n  }\n  currentVotableStep {\n    __typename\n    ...ProposalPageVoteThreshold_step\n    id\n    voteThreshold\n    voteType\n  }\n  votableSteps {\n    __typename\n    id\n    title\n  }\n  viewerCanSeeEvaluation\n  allFollowers: followers(first: 0) {\n    totalCount\n  }\n}\n\nfragment ProposalPageHeader_proposal_39ngnn on Proposal {\n  id\n  ...UnpublishedLabel_publishable\n  ...ProposalVoteButtonWrapperFragment_proposal_Q37Wz\n  ...ProposalVoteModal_proposal_2r3fA4 @include(if: $isAuthenticated)\n  ...ProposalFollowButton_proposal_39ngnn\n  title\n  theme {\n    title\n    id\n  }\n  author {\n    username\n    displayName\n    media {\n      url\n      id\n    }\n    id\n  }\n  createdAt\n  publishedAt\n  updatedAt\n  publicationStatus\n  url\n  project {\n    opinionCanBeFollowed\n    id\n  }\n  form {\n    isProposalForm\n    id\n  }\n}\n\nfragment UnpublishedLabel_publishable on Publishable {\n  id\n  published\n  notPublishedReason\n  publishableUntil\n}\n\nfragment ProposalVoteButtonWrapperFragment_proposal_Q37Wz on Proposal {\n  id\n  estimation\n  viewerHasVote(step: $stepId) @include(if: $isAuthenticated)\n  ...ProposalVoteButton_proposal_Q37Wz\n}\n\nfragment ProposalVoteModal_proposal_2r3fA4 on Proposal {\n  id\n  viewerHasVote(step: $stepId)\n}\n\nfragment ProposalFollowButton_proposal_39ngnn on Proposal {\n  id\n  viewerIsFollowing @include(if: $isAuthenticated)\n  viewerFollowingConfiguration @include(if: $isAuthenticated)\n}\n\nfragment ProposalVoteButton_proposal_Q37Wz on Proposal {\n  id\n  viewerHasVote(step: $stepId) @include(if: $isAuthenticated)\n  viewerVote(step: $stepId) @include(if: $isAuthenticated) {\n    id\n    ...UnpublishedTooltip_publishable\n  }\n}\n\nfragment UnpublishedTooltip_publishable on Publishable {\n  id\n  published\n  notPublishedReason\n}\n\nfragment ProposalPageFollowers_proposal on Proposal {\n  id\n  followers(first: 20) {\n    edges {\n      cursor\n      node {\n        id\n        ...UserBox_user\n        __typename\n      }\n    }\n    pageInfo {\n      hasPreviousPage\n      hasNextPage\n      endCursor\n      startCursor\n    }\n    totalCount\n  }\n}\n\nfragment ProposalPageEvaluation_proposal on Proposal {\n  id\n  viewerIsAnEvaluer\n  form {\n    evaluationForm {\n      description\n      questions {\n        __typename\n        id\n        title\n        number\n        private\n        position\n        required\n        helpText\n        jumps {\n          id\n          always\n          origin {\n            __typename\n            id\n          }\n          destination {\n            __typename\n            id\n            title\n            number\n          }\n          conditions {\n            __typename\n            id\n            operator\n            question {\n              __typename\n              id\n              title\n            }\n            ... on MultipleChoiceQuestionLogicJumpCondition {\n              value {\n                id\n                title\n              }\n            }\n          }\n        }\n        description\n        type\n        ... on MultipleChoiceQuestion {\n          isOtherAllowed\n          randomQuestionChoices\n          validationRule {\n            type\n            number\n          }\n          choices(allowRandomize: true) {\n            id\n            title\n            description\n            color\n            image {\n              id\n              url\n            }\n          }\n        }\n      }\n      id\n    }\n    id\n  }\n  evaluation {\n    version\n    responses {\n      __typename\n      question {\n        __typename\n        id\n      }\n      ... on ValueResponse {\n        value\n      }\n      ... on MediaResponse {\n        medias {\n          id\n          name\n          size\n          url\n        }\n      }\n    }\n  }\n}\n\nfragment ProposalFusionList_proposal on Proposal {\n  id\n  mergedFrom {\n    id\n    url\n    title\n  }\n  mergedIn {\n    id\n    url\n    title\n  }\n}\n\nfragment ProposalPageMetadata_proposal on Proposal {\n  ...ProposalDetailEstimation_proposal\n  ...ProposalDetailLikers_proposal\n  id\n  theme {\n    title\n    id\n  }\n  estimation\n  likers {\n    id\n  }\n  category {\n    name\n    id\n  }\n  district {\n    name\n    id\n  }\n  reference\n}\n\nfragment ProposalPageLastNews_proposal on Proposal {\n  news {\n    totalCount\n    edges {\n      node {\n        ...AnswerBody_answer\n        title\n        authors {\n          vip\n          id\n        }\n        id\n      }\n    }\n  }\n}\n\nfragment ProposalPageBlog_proposal on Proposal {\n  news {\n    totalCount\n    edges {\n      node {\n        ...Post_post\n        id\n      }\n    }\n  }\n}\n\nfragment ProposalPageContent_proposal on Proposal {\n  id\n  ...ProposalDeleteModal_proposal\n  ...ProposalEditModal_proposal\n  ...ProposalVoteButtonWrapperFragment_proposal_Q37Wz\n  author {\n    id\n    slug\n  }\n  form {\n    contribuable\n    id\n  }\n  address\n  body\n  summary\n  media {\n    url\n    id\n  }\n  ...ProposalPageComments_proposal\n  ...ProposalReportButton_proposal_39ngnn\n  publicationStatus\n  title\n  url\n  currentVotableStep {\n    __typename\n    id\n    open\n  }\n  responses {\n    __typename\n    ...ProposalResponse_response\n  }\n}\n\nfragment ProposalPageAdvancement_proposal on Proposal {\n  ...ProposalDetailAdvancement_proposal\n}\n\nfragment ProposalPageVoteThreshold_proposal on Proposal {\n  id\n  votes {\n    totalCount\n  }\n}\n\nfragment ProposalPageVoteThreshold_step on Step {\n  id\n  ... on CollectStep {\n    voteThreshold\n  }\n  ... on SelectionStep {\n    voteThreshold\n  }\n}\n\nfragment ProposalDetailAdvancement_proposal on Proposal {\n  id\n  status {\n    name\n    color\n    id\n  }\n  selections {\n    step {\n      id\n      position\n    }\n    status {\n      name\n      color\n      id\n    }\n  }\n  progressSteps {\n    title\n    startAt\n    endAt\n    id\n  }\n}\n\nfragment ProposalDeleteModal_proposal on Proposal {\n  id\n  title\n}\n\nfragment ProposalEditModal_proposal on Proposal {\n  id\n  form {\n    ...ProposalForm_proposalForm\n    id\n  }\n  publicationStatus\n  ...ProposalForm_proposal\n  ...ProposalDraftAlert_proposal\n}\n\nfragment ProposalPageComments_proposal on Proposal {\n  id\n  form {\n    id\n    commentable\n  }\n}\n\nfragment ProposalReportButton_proposal_39ngnn on Proposal {\n  id\n  author {\n    id\n  }\n  viewerHasReport @include(if: $isAuthenticated)\n}\n\nfragment ProposalResponse_response on Response {\n  question {\n    __typename\n    id\n    title\n    number\n    private\n    position\n    required\n    helpText\n    jumps {\n      id\n      always\n      origin {\n        __typename\n        id\n      }\n      destination {\n        __typename\n        id\n        title\n        number\n      }\n      conditions {\n        __typename\n        id\n        operator\n        question {\n          __typename\n          id\n          title\n        }\n        ... on MultipleChoiceQuestionLogicJumpCondition {\n          value {\n            id\n            title\n          }\n        }\n      }\n    }\n    description\n    type\n    ... on MultipleChoiceQuestion {\n      isOtherAllowed\n      randomQuestionChoices\n      validationRule {\n        type\n        number\n      }\n      choices(allowRandomize: true) {\n        id\n        title\n        description\n        color\n        image {\n          id\n          url\n        }\n      }\n    }\n  }\n  ... on ValueResponse {\n    value\n  }\n  ... on MediaResponse {\n    medias {\n      ...ProposalMediaResponse_medias\n      id\n    }\n  }\n}\n\nfragment ProposalMediaResponse_medias on Media {\n  id\n  name\n  size\n  url\n}\n\nfragment ProposalForm_proposalForm on ProposalForm {\n  id\n  description\n  suggestingSimilarProposals\n  step {\n    id\n  }\n  districts(order: ALPHABETICAL) {\n    id\n    name\n  }\n  categories(order: ALPHABETICAL) {\n    id\n    name\n  }\n  questions {\n    __typename\n    id\n    title\n    number\n    private\n    position\n    required\n    helpText\n    jumps {\n      id\n      always\n      origin {\n        __typename\n        id\n      }\n      destination {\n        __typename\n        id\n        title\n        number\n      }\n      conditions {\n        __typename\n        id\n        operator\n        question {\n          __typename\n          id\n          title\n        }\n        ... on MultipleChoiceQuestionLogicJumpCondition {\n          value {\n            id\n            title\n          }\n        }\n      }\n    }\n    description\n    type\n    ... on MultipleChoiceQuestion {\n      isOtherAllowed\n      randomQuestionChoices\n      validationRule {\n        type\n        number\n      }\n      choices(allowRandomize: true) {\n        id\n        title\n        description\n        color\n        image {\n          id\n          url\n        }\n      }\n    }\n  }\n  usingDistrict\n  districtMandatory\n  districtHelpText\n  usingThemes\n  themeMandatory\n  usingCategories\n  categoryMandatory\n  categoryHelpText\n  usingAddress\n  titleHelpText\n  summaryHelpText\n  themeHelpText\n  illustrationHelpText\n  descriptionHelpText\n  addressHelpText\n  proposalInAZoneRequired\n  isProposalForm\n  usingDescription\n  descriptionMandatory\n  usingSummary\n  usingIllustration\n}\n\nfragment ProposalForm_proposal on Proposal {\n  id\n  title\n  body\n  summary\n  address\n  publicationStatus\n  category {\n    id\n  }\n  theme {\n    id\n  }\n  district {\n    id\n  }\n  responses {\n    __typename\n    question {\n      __typename\n      id\n    }\n    ... on ValueResponse {\n      value\n    }\n    ... on MediaResponse {\n      medias {\n        id\n        name\n        size\n        url\n      }\n    }\n  }\n  media {\n    id\n    name\n    size\n    url\n  }\n}\n\nfragment Post_post on Post {\n  abstract\n  url\n  media {\n    url\n    id\n  }\n  publishedAt\n  title\n  createdAt\n  themes {\n    title\n    url\n    id\n  }\n  authors {\n    id\n    url\n    vip\n    displayName\n  }\n}\n\nfragment AnswerBody_answer on AnswerOrPost {\n  ... on Answer {\n    body\n    createdAt\n    author {\n      displayName\n      media {\n        url\n        id\n      }\n      url\n      id\n    }\n  }\n  ... on Post {\n    title\n    createdAt\n    body\n    authors {\n      id\n      vip\n      displayName\n    }\n  }\n}\n\nfragment ProposalDetailEstimation_proposal on Proposal {\n  estimation\n}\n\nfragment ProposalDetailLikers_proposal on Proposal {\n  id\n  likers {\n    id\n  }\n  ...ProposalDetailLikersLabel_proposal\n  ...ProposalDetailLikersModal_proposal\n}\n\nfragment ProposalDetailLikersLabel_proposal on Proposal {\n  id\n  likers {\n    id\n  }\n}\n\nfragment ProposalDetailLikersModal_proposal on Proposal {\n  id\n  likers {\n    id\n    displayName\n    biography\n    url\n    username\n    vip\n    media {\n      url\n      id\n    }\n  }\n}\n\nfragment UserBox_user on User {\n  ...UserPreview_user\n}\n\nfragment UserPreview_user on User {\n  ...UserNotConfirmedLabel_user\n  url\n  displayName\n  username\n  contributionsCount\n  media {\n    url\n    id\n  }\n}\n\nfragment UserNotConfirmedLabel_user on User {\n  isEmailConfirmed\n}\n\nfragment ProposalPageContent_step on ProposalStep {\n  id\n  ...ProposalVoteButtonWrapperFragment_step\n}\n\nfragment ProposalVoteButtonWrapperFragment_step on ProposalStep {\n  id\n  title\n  votesLimit\n  voteType\n  open\n  ...VoteButtonOverlay_step\n}\n\nfragment VoteButtonOverlay_step on ProposalStep {\n  id\n  votesLimit\n}\n\nfragment ProposalVoteModal_step_39ngnn on ProposalStep {\n  id\n  votesRanking\n  votesHelpText\n  ... on RequirementStep {\n    requirements {\n      viewerMeetsTheRequirements @include(if: $isAuthenticated)\n      reason\n      totalCount\n    }\n  }\n  form {\n    isProposalForm\n    id\n  }\n  ...RequirementsForm_step_39ngnn\n  ...ProposalsUserVotesTable_step\n  viewerVotes(orderBy: {field: POSITION, direction: ASC}) @include(if: $isAuthenticated) {\n    ...ProposalsUserVotesTable_votes\n    totalCount\n    edges {\n      node {\n        id\n      }\n    }\n  }\n}\n\nfragment RequirementsForm_step_39ngnn on RequirementStep {\n  requirements {\n    edges {\n      node {\n        __typename\n        id\n        viewerMeetsTheRequirement @include(if: $isAuthenticated)\n        ... on DateOfBirthRequirement {\n          viewerDateOfBirth @include(if: $isAuthenticated)\n        }\n        ... on FirstnameRequirement {\n          viewerValue @include(if: $isAuthenticated)\n        }\n        ... on LastnameRequirement {\n          viewerValue @include(if: $isAuthenticated)\n        }\n        ... on PhoneRequirement {\n          viewerValue @include(if: $isAuthenticated)\n        }\n        ... on CheckboxRequirement {\n          label\n        }\n      }\n    }\n  }\n}\n\nfragment ProposalsUserVotesTable_step on ProposalStep {\n  id\n  votesRanking\n  ...ProposalUserVoteItem_step\n}\n\nfragment ProposalsUserVotesTable_votes on ProposalVoteConnection {\n  edges {\n    node {\n      id\n      ...ProposalUserVoteItem_vote\n      anonymous\n      proposal {\n        id\n        title\n      }\n    }\n  }\n}\n\nfragment ProposalUserVoteItem_vote on ProposalVote {\n  ...UnpublishedLabel_publishable\n  published\n  createdAt\n  proposal {\n    id\n    title\n    url\n    ...ProposalDetailEstimation_proposal\n  }\n}\n\nfragment ProposalUserVoteItem_step on ProposalStep {\n  id\n  open\n  voteType\n  votesRanking\n}\n\nfragment ProposalVoteButtonWrapperFragment_viewer_Q37Wz on User {\n  id\n  proposalVotes(stepId: $stepId) @include(if: $isAuthenticated) {\n    totalCount\n    creditsLeft\n  }\n}\n\nfragment ProposalPageContent_viewer_4ESFbG on User {\n  id\n  ...ProposalVoteButtonWrapperFragment_viewer_Q37Wz @include(if: $hasVotableStep)\n}\n","variables":{"proposalId":"'$1'","hasVotableStep":false,"stepId":"","count":32,"cursor":null,"isAuthenticated":false}}'