stash-box icon indicating copy to clipboard operation
stash-box copied to clipboard

[Bug Report] GQL imageCreate schema still accepts `url`

Open feederbox826 opened this issue 2 years ago • 0 comments

Describe the bug the imageCreate mutation still accepts URL when only path should be affected

To Reproduce query:

mutation imageCreate {
    imageCreate(
        input: {
            url: "https://upload.wikimedia.org/wikipedia/commons/6/66/SMPTE_Color_Bars.svg"
        }
    ) {
        id
    }
}

error:

{
    "errors": [
        {
            "message": "Missing URL or file",
            "path": [
                "imageCreate"
            ]
        }
    ],
    "data": {
        "imageCreate": null
    }
}

stash-box-config.yml

...
image_backend: file
image_location: /images

Expected behavior GQL imageCreate should be updated to omit URL input instead of responding with a misleading error message

Additional context confirmed by infinite in discord

I can try to poke around the GQL myself and submit a PR

feederbox826 avatar Nov 01 '23 21:11 feederbox826