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

Added Content-Type header for v1.1 #26

Open
wants to merge 2 commits into
base: master
from

Conversation

@prashant-shahi
Copy link
Member

commented Aug 1, 2019

This change is Reviewable

@CLAassistant

This comment has been minimized.

Copy link

commented Aug 1, 2019

CLA assistant check
All committers have signed the CLA.

@prashant-shahi prashant-shahi requested a review from paulftw Aug 1, 2019

@prashant-shahi prashant-shahi changed the title Added Content-Type header Added Content-Type header for v1.1 Aug 6, 2019

@prashant-shahi prashant-shahi requested a review from pawanrawal Aug 6, 2019

@danielmai

This comment has been minimized.

Copy link
Member

commented Aug 14, 2019

Does this change the example output for the Curl tab in all the runnables? It should include the right header that can be copied.

@prashant-shahi

This comment has been minimized.

Copy link
Member Author

commented Aug 15, 2019

@danielmai Now it does.

@prashant-shahi prashant-shahi requested a review from danielmai Aug 16, 2019

@mangalaman93
Copy link

left a comment

Please search through the whole repo to find list of headers that are still getting used. From the PR dgraph-io/dgraph#3637 and dgraph-io/dgraph#3365, we have removed following headers -

  • X-Dgraph-IgnoreIndexConflict
  • X-Dgraph-MutationType
  • X-Dgraph-CommitNow
  • X-Dgraph-Vars

Reviewable status: 0 of 2 files reviewed, 2 unresolved discussions (waiting on @danielmai, @paulftw, @pawanrawal, and @prashant-shahi)


layouts/shortcodes/runnable.html, line 53 at r2 (raw file):

            <div class="runnable-tab-content" data-tab="curl">
              <pre><code class="no-copy" tabindex="-1">curl -H "Content-Type: application/graphql+-" localhost:8080/query -XPOST {{ with .Get "vars" }}-H 'X-Dgraph-Vars: {{.}}' {{ end }}-d '<br/><span class="query-content">{{ $code }}</span>' | python -m json.tool | less

We do not support X-Dgraph-vars in 1.1. We should remove it


static/js/runnable.js, line 341 at r2 (raw file):

    $.post({
      url: window.DGRAPH_ENDPOINT,
      headers: { "X-Dgraph-Vars": vars, "Content-Type": "application/graphql+-"},

same here!

@prashant-shahi
Copy link
Member Author

left a comment

Removing vars will affect the code examples using vars. Like here : https://docs.dgraph.io/query-language/#graphql-variables

Please let me know what would be the appropriate thing to do here.

Reviewable status: 0 of 2 files reviewed, 2 unresolved discussions (waiting on @danielmai, @paulftw, @pawanrawal, and @prashant-shahi)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants
You can’t perform that action at this time.