Skip to content

chore(nimbus): replace GraphQL with form POSTs in integration test helpers#14841

Closed
jaredlockhart wants to merge 1 commit intomainfrom
14839
Closed

chore(nimbus): replace GraphQL with form POSTs in integration test helpers#14841
jaredlockhart wants to merge 1 commit intomainfrom
14839

Conversation

@jaredlockhart
Copy link
Collaborator

Because

  • The GraphQL API is being removed from experimenter
  • The integration tests use GraphQL mutations to create, update, and end
    experiments, and GraphQL queries for config and experiment data
  • All of this functionality already exists in the Django form views and
    REST API endpoints

This commit

  • Rewrites helpers.py to POST directly to Django form views (/nimbus/create/,
    /nimbus/{slug}/update_branches/, /nimbus/{slug}/update_audience/, etc.)
    instead of using GraphQL mutations
  • Reads experiment data via the v6 REST API (/api/v6/experiments/{slug}/ and
    /api/v6/draft-experiments/{slug}/) instead of GraphQL queries
  • Generates feature config IDs to JSON (extending the targeting configs management
    command) instead of querying via GraphQL
  • Adds DISABLE_CSRF env var support to skip CSRF middleware in CI
  • Removes all GraphQL query/mutation code from the integration test helpers
  • Adds unit test for the management command

Fixes #14839

…lpers

Because

* The GraphQL API is being removed from experimenter
* The integration tests use GraphQL mutations to create, update, and
  end experiments, and GraphQL queries for config and experiment data
* All of this functionality already exists in the Django form views and
  REST API endpoints

This commit

* Rewrites helpers.py to POST directly to Django form views instead of
  using GraphQL mutations for experiment CRUD
* Reads experiment data via the v6 REST API instead of GraphQL queries
* Generates feature config IDs to JSON (extending the targeting configs
  management command) instead of querying them via GraphQL
* Adds DISABLE_CSRF env var support to skip CSRF middleware in CI
* Removes all GraphQL query/mutation code from the integration test
  helpers

Fixes #14839

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@jaredlockhart
Copy link
Collaborator Author

Superseded — splitting into separate PR on top of #14815

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Replace GraphQL mutations with form POSTs in integration tests

1 participant