mirror of
https://github.com/mountain-loop/yaak.git
synced 2026-04-23 17:28:29 +02:00
Fix GraphQL content type on creation, and placeholder
This commit is contained in:
@@ -8,7 +8,7 @@
|
|||||||
},
|
},
|
||||||
"package": {
|
"package": {
|
||||||
"productName": "Yaak",
|
"productName": "Yaak",
|
||||||
"version": "2024.3.2"
|
"version": "2024.3.3"
|
||||||
},
|
},
|
||||||
"tauri": {
|
"tauri": {
|
||||||
"windows": [],
|
"windows": [],
|
||||||
@@ -28,7 +28,7 @@
|
|||||||
"scope": [
|
"scope": [
|
||||||
"$RESOURCE/*",
|
"$RESOURCE/*",
|
||||||
"$APPDATA/responses/*"
|
"$APPDATA/responses/*"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"shell": {
|
"shell": {
|
||||||
"all": false,
|
"all": false,
|
||||||
|
|||||||
@@ -179,7 +179,9 @@ const _Editor = forwardRef<EditorView | undefined, EditorProps>(function Editor(
|
|||||||
doc: `${defaultValue ?? ''}`,
|
doc: `${defaultValue ?? ''}`,
|
||||||
extensions: [
|
extensions: [
|
||||||
languageCompartment.of(langExt),
|
languageCompartment.of(langExt),
|
||||||
placeholderCompartment.current.of([]),
|
placeholderCompartment.current.of(
|
||||||
|
placeholderExt(placeholderElFromText(placeholder ?? '')),
|
||||||
|
),
|
||||||
wrapLinesCompartment.current.of([]),
|
wrapLinesCompartment.current.of([]),
|
||||||
...getExtensions({
|
...getExtensions({
|
||||||
container,
|
container,
|
||||||
|
|||||||
@@ -32,7 +32,12 @@ export function useCreateDropdownItems({
|
|||||||
label: 'GraphQL Query',
|
label: 'GraphQL Query',
|
||||||
leftSlot: hideIcons ? undefined : <Icon icon="plus" />,
|
leftSlot: hideIcons ? undefined : <Icon icon="plus" />,
|
||||||
onSelect: () =>
|
onSelect: () =>
|
||||||
createHttpRequest.mutate({ folderId, bodyType: BODY_TYPE_GRAPHQL, method: 'POST' }),
|
createHttpRequest.mutate({
|
||||||
|
folderId,
|
||||||
|
bodyType: BODY_TYPE_GRAPHQL,
|
||||||
|
method: 'POST',
|
||||||
|
headers: [{ name: 'Content-Type', value: 'application/json' }],
|
||||||
|
}),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
key: 'create-grpc-request',
|
key: 'create-grpc-request',
|
||||||
|
|||||||
@@ -16,7 +16,9 @@ export function useCreateHttpRequest() {
|
|||||||
return useMutation<
|
return useMutation<
|
||||||
HttpRequest,
|
HttpRequest,
|
||||||
unknown,
|
unknown,
|
||||||
Partial<Pick<HttpRequest, 'name' | 'sortPriority' | 'folderId' | 'bodyType' | 'method'>>
|
Partial<
|
||||||
|
Pick<HttpRequest, 'name' | 'sortPriority' | 'folderId' | 'bodyType' | 'method' | 'headers'>
|
||||||
|
>
|
||||||
>({
|
>({
|
||||||
mutationFn: (patch) => {
|
mutationFn: (patch) => {
|
||||||
if (workspaceId === null) {
|
if (workspaceId === null) {
|
||||||
|
|||||||
Reference in New Issue
Block a user