Skip to content

feat: add baseURL option for dynamic http question#1541

Draft
zacharyjhankin wants to merge 30 commits into
developfrom
feat-dynamic-http-option3
Draft

feat: add baseURL option for dynamic http question#1541
zacharyjhankin wants to merge 30 commits into
developfrom
feat-dynamic-http-option3

Conversation

@zacharyjhankin

@zacharyjhankin zacharyjhankin commented May 27, 2026

Copy link
Copy Markdown
Collaborator

Description

This adds an option to dynamically set the baseURL of the dynamic question to the domain that is currently deployed.

Motivation and Context

We are using a graphQL endpoint to obtain the list of countries that the users can select as their country. This will always use the domain that the UOC is deployed on, and different environments will have different domains. This lets the code dynamically call its own domain. We also don't want users getting confused.

How Has This Been Tested

I made a dynamic http question in the develop branch and checked that in the proposal it would work to make the countries. using:

http://localhost:3000/graphql?query=query%20ExampleQuery%20%7B%20countries%20%7B%20value%20%7D%20%7D

$.data.countries[*].value

content-type:application/json

then I switched to my branch and ran npm run generate:sdk

I confirmed my conversion worked to add baseURL to the dynamic question.

I confirmed that the existing question would still work without changing anything in a new proposal

I then edited my proposal template HTTP question to use my baseURL setting.

I confirmed that the country list would still be shown in the proposal.

image image image image

NOTE:

There is an existing bug that means the URL that the proposal uses when someone is filling it out to get the countries is the parent question. Not the question that is edited for the specific template. This means you may encounter this error when testing. So make sure to edit both the parent question and the template question when testing this to see it actually being used.

Tests included/Docs Updated?

Added backend unit test

  • I have added tests to cover my changes.
  • All relevant doc has been updated

@zacharyjhankin zacharyjhankin changed the title add: baseURL option for dynamic http question feat: baseURL option for dynamic http question May 27, 2026
@zacharyjhankin zacharyjhankin changed the title feat: baseURL option for dynamic http question feat: add baseURL option for dynamic http question Jun 5, 2026
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.

1 participant