Added some GraphQL page updates
This commit is contained in:
@@ -181,6 +181,8 @@ export default {
|
|||||||
loading: "Loading...",
|
loading: "Loading...",
|
||||||
fetching: "Fetching...",
|
fetching: "Fetching...",
|
||||||
waiting_send_req: "(waiting to send request)",
|
waiting_send_req: "(waiting to send request)",
|
||||||
|
waiting_receive_response: "(waiting to receive response)",
|
||||||
|
waiting_receive_schema: "(waiting to receive schema)",
|
||||||
cancel: "Cancel",
|
cancel: "Cancel",
|
||||||
save: "Save",
|
save: "Save",
|
||||||
dismiss: "Dismiss",
|
dismiss: "Dismiss",
|
||||||
|
|||||||
@@ -102,8 +102,8 @@
|
|||||||
|
|
||||||
<pw-section class="green" :label="$t('schema')" ref="schema">
|
<pw-section class="green" :label="$t('schema')" ref="schema">
|
||||||
<div class="flex-wrap">
|
<div class="flex-wrap">
|
||||||
<label>{{ $t("response") }}</label>
|
<label>{{ $t("schema") }}</label>
|
||||||
<div>
|
<div v-if="schema">
|
||||||
<button
|
<button
|
||||||
class="icon"
|
class="icon"
|
||||||
@click="ToggleExpandResponse"
|
@click="ToggleExpandResponse"
|
||||||
@@ -135,11 +135,12 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<Editor
|
<Editor
|
||||||
|
v-if="schema"
|
||||||
:value="schema"
|
:value="schema"
|
||||||
:lang="'graphqlschema'"
|
:lang="'graphqlschema'"
|
||||||
:options="{
|
:options="{
|
||||||
maxLines: responseBodyMaxLines,
|
maxLines: responseBodyMaxLines,
|
||||||
minLines: '16',
|
minLines: 16,
|
||||||
fontSize: '16px',
|
fontSize: '16px',
|
||||||
autoScrollEditorIntoView: true,
|
autoScrollEditorIntoView: true,
|
||||||
readOnly: true,
|
readOnly: true,
|
||||||
@@ -147,6 +148,16 @@
|
|||||||
useWorker: false,
|
useWorker: false,
|
||||||
}"
|
}"
|
||||||
/>
|
/>
|
||||||
|
<input
|
||||||
|
v-else
|
||||||
|
class="missing-data-response"
|
||||||
|
:value="$t('waiting_receive_schema')"
|
||||||
|
ref="status"
|
||||||
|
id="status"
|
||||||
|
name="status"
|
||||||
|
readonly
|
||||||
|
type="text"
|
||||||
|
/>
|
||||||
</pw-section>
|
</pw-section>
|
||||||
|
|
||||||
<pw-section class="cyan" :label="$t('query')" ref="query">
|
<pw-section class="cyan" :label="$t('query')" ref="query">
|
||||||
@@ -175,7 +186,7 @@
|
|||||||
:onRunGQLQuery="runQuery"
|
:onRunGQLQuery="runQuery"
|
||||||
:options="{
|
:options="{
|
||||||
maxLines: responseBodyMaxLines,
|
maxLines: responseBodyMaxLines,
|
||||||
minLines: '16',
|
minLines: 10,
|
||||||
fontSize: '16px',
|
fontSize: '16px',
|
||||||
autoScrollEditorIntoView: true,
|
autoScrollEditorIntoView: true,
|
||||||
showPrintMargin: false,
|
showPrintMargin: false,
|
||||||
@@ -189,8 +200,8 @@
|
|||||||
v-model="variableString"
|
v-model="variableString"
|
||||||
:lang="'json'"
|
:lang="'json'"
|
||||||
:options="{
|
:options="{
|
||||||
maxLines: responseBodyMaxLines,
|
maxLines: 10,
|
||||||
minLines: '16',
|
minLines: 5,
|
||||||
fontSize: '16px',
|
fontSize: '16px',
|
||||||
autoScrollEditorIntoView: true,
|
autoScrollEditorIntoView: true,
|
||||||
showPrintMargin: false,
|
showPrintMargin: false,
|
||||||
@@ -214,12 +225,13 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<Editor
|
<Editor
|
||||||
|
v-if="response"
|
||||||
:value="response"
|
:value="response"
|
||||||
:lang="'json'"
|
:lang="'json'"
|
||||||
:lint="false"
|
:lint="false"
|
||||||
:options="{
|
:options="{
|
||||||
maxLines: responseBodyMaxLines,
|
maxLines: responseBodyMaxLines,
|
||||||
minLines: '16',
|
minLines: 10,
|
||||||
fontSize: '16px',
|
fontSize: '16px',
|
||||||
autoScrollEditorIntoView: true,
|
autoScrollEditorIntoView: true,
|
||||||
readOnly: true,
|
readOnly: true,
|
||||||
@@ -227,6 +239,16 @@
|
|||||||
useWorker: false,
|
useWorker: false,
|
||||||
}"
|
}"
|
||||||
/>
|
/>
|
||||||
|
<input
|
||||||
|
v-else
|
||||||
|
class="missing-data-response"
|
||||||
|
:value="$t('waiting_receive_response')"
|
||||||
|
ref="status"
|
||||||
|
id="status"
|
||||||
|
name="status"
|
||||||
|
readonly
|
||||||
|
type="text"
|
||||||
|
/>
|
||||||
</pw-section>
|
</pw-section>
|
||||||
</div>
|
</div>
|
||||||
<aside class="sticky-inner inner-right">
|
<aside class="sticky-inner inner-right">
|
||||||
|
|||||||
@@ -22,8 +22,13 @@ export default () => ({
|
|||||||
url: "https://rickandmortyapi.com/graphql",
|
url: "https://rickandmortyapi.com/graphql",
|
||||||
headers: [],
|
headers: [],
|
||||||
schema: "",
|
schema: "",
|
||||||
variablesJSONString: "{}",
|
variablesJSONString: '{ "id": "1" }',
|
||||||
query: "",
|
query: `query charcter {
|
||||||
|
character(id: 1) {
|
||||||
|
id
|
||||||
|
name
|
||||||
|
}
|
||||||
|
}`,
|
||||||
response: "",
|
response: "",
|
||||||
},
|
},
|
||||||
theme: {
|
theme: {
|
||||||
|
|||||||
Reference in New Issue
Block a user