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

Error on saving/publishing a Document - updateDocument mutation #281

Open
cusspvz opened this issue Jul 15, 2019 · 0 comments
Open

Error on saving/publishing a Document - updateDocument mutation #281

cusspvz opened this issue Jul 15, 2019 · 0 comments
Labels

Comments

@cusspvz
Copy link

cusspvz commented Jul 15, 2019

A coworker was playing with Prime CMS for a while and noticed that one of the Content Types could be somehow corrupted. Whenever they tried to save a page with slices on it, the slices info just disappeared for no reason. We inspected the requests and found out that the updateDocument graphql mutation was returning an error.

Here's more info about that specific request:

request

{  
   "operationName":"updateDocument",
   "variables":{  
      "id":"77c83453-34a1-4884-8d97-0ffa1e35cb44",
      "data":{  
         "title":"quem",
         "description":"",
         "services":[  
            {  
               "__index":0,
               "__inputname":"883f9c5f-ea58-413c-9124-4f51e8e7b4a9",
               "bodytitle":"awetwet"
            }
         ]
      }
   },
   "query":"mutation updateDocument($id: ID!, $data: JSON, $locale: String, $releaseId: ID) {\n  updateDocument(id: $id, data: $data, locale: $locale, releaseId: $releaseId) {\n    id\n    documentId\n    schemaId\n    releaseId\n    locale\n    data\n    publishedAt\n    createdAt\n    updatedAt\n    versions {\n      id\n      publishedAt\n      createdAt\n      updatedAt\n      __typename\n    }\n    __typename\n  }\n}\n"
}

response

{  
   "errors":[  
      {  
         "message":"The loader.load() function must be called with a value,but got: undefined.",
         "locations":[  
            {  
               "line":2,
               "column":3
            }
         ],
         "path":[  
            "updateDocument"
         ],
         "extensions":{  
            "code":"INTERNAL_SERVER_ERROR"
         }
      }
   ],
   "data":null
}

Not sure tho of what was happening under the hood. Hope it helps.

@cusspvz cusspvz changed the title Error while updating Error on saving/publishing a Document - updateDocument mutation Jul 15, 2019
@birkir birkir added the bug label Jul 18, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants