Skip to content
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

determine api root from consolepath var on console #1228

Merged
merged 3 commits into from
Jan 4, 2019

Conversation

wawhal
Copy link
Contributor

@wawhal wawhal commented Dec 18, 2018

Description

What component does this PR affect?

  • Server
  • Console
  • CLI
  • Docs
  • Community Content
  • Build System

Requires changes from other components? If yes, please mark the components:

  • Server
  • Console
  • CLI
  • Docs
  • Community Content
  • Build System

Related Issue

Solution and Design

Type

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Docs update
  • Community content

Checklist:

  • I have read the contributing guide and my code conforms to the guidelines.
  • This change requires a change in the documentation.
  • I have updated the documentation accordingly.
  • I have added required tests.

@wawhal wawhal requested a review from karthikvt26 December 18, 2018 12:17
@hasura-bot
Copy link
Contributor

Review app for commit 06a1f6a deployed to Heroku: https://hge-ci-pull-1228.herokuapp.com
Docker image for server: hasura/graphql-engine:pull1228-06a1f6a

@@ -63,8 +63,22 @@ if (

if (globals.consoleMode === SERVER_CONSOLE_MODE) {
if (globals.nodeEnv !== 'development') {
const windowUrl = window.location.protocol + '//' + window.location.host;
globals.dataApiUrl = windowUrl;
if (window.__env.consolePath) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

add this env in helpers/Html.js

@praveenweb praveenweb added the c/console Related to console label Dec 19, 2018
@hasura-bot
Copy link
Contributor

Review app for commit bf7d78f deployed to Heroku: https://hge-ci-pull-1228.herokuapp.com
Docker image for server: hasura/graphql-engine:pull1228-bf7d78f

@wawhal wawhal added the s/ok-to-merge Status: This pull request can be merged to master label Jan 4, 2019
@shahidhk shahidhk changed the title console determines api root from console path determine api root from consolepath var on console Jan 4, 2019
@shahidhk shahidhk merged commit 8134116 into hasura:master Jan 4, 2019
@hasura-bot
Copy link
Contributor

Review app https://hge-ci-pull-1228.herokuapp.com is deleted

@mastoj
Copy link

mastoj commented Jun 15, 2019

@shahidhk Do I need to set any environment variable to get this working? I have exactly this issue. I want to server the console on http:///something/console. I couldn't find the information in the docs.

@shahidhk
Copy link
Member

@mastoj No, this should be taken care of automatically. You just have to put a reverse proxy in front of Hasura and forward requests to Hasura without the URL prefix.

@mastoj
Copy link

mastoj commented Jun 18, 2019

@shahidhk you're completely right, but I couldn't get the nginx proxy to work the way I wanted in combination with ingress on kubernetes. I did however get it to work after switching from nginx to traefik.

@knthm
Copy link
Contributor

knthm commented Oct 21, 2020

Heads up to anyone trying to serve graphql-engine behind an nginx reverse proxy and a URL prefix:

You need to append a slash to the upstream URL in proxy_pass.

location /api {
    proxy_pass http://graphql-engine/;
                                    ^
}

Without the trailing slash the graphql-engine will return an error.

@livtanong
Copy link

livtanong commented Jul 21, 2021

Given @KloudJack 's setup with /api as the prefix, if you visit https://your-domain.com/api, you'll be redirected to https://your-domain.com/console. (which, if you don't have anything there, will be a 404)

Visiting https://your-domain.com/api/console is a good enough workaround, but I can't help feeling the /console redirect should also take the prefix into account.

hasura-bot pushed a commit that referenced this pull request Oct 17, 2024
<!-- The PR description should answer 2 important questions: -->

### What

This PR enables argument presets in the OpenDD pipeline by using
functions from `graphql_ir`. In the ideal future we'd flip the
dependency and move these functions out of `graphql_ir` and into the
`plan` crate, however we can't do that until `execute` crate is no
longer in active development as it will involve making a big mess there.

### How

- Calculate argument presets in the `plan/query/model_target` module
using functions from `graphql_ir`
- We also begin adding boolean expression resolve, then back away slowly
as it's a massive job and better tackled when we start making `where`
clauses work in this pipeline, to stop this PR ballooning insanely.

V3_GIT_ORIGIN_REV_ID: 47867452b7366e83f71b118e37302de93d9bde72
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
c/console Related to console s/ok-to-merge Status: This pull request can be merged to master
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants