Getting "Instance data is not valid." but update partially goes through?

In attempting to update a schema via the dashboard, I received the Instance data is not valid error as noted and discussed on previous threads.

While reading through and trying to find the source of the issue, I noticed that the live schema now has one of the values I was attempting to add when the failure/rejection occurred.

I took the error to mean the update was prevented, but is it more accurate to say the error means the update was interrupted ?

I ask because I’m wondering if orphaned values may be the cause of subsequent Instance data is not valid problems.

The update I was (and am) attempting to perform:

FROM (edited parts)

type Mutation {
	createUser(input: CreateUserInput): User! @resolver(name: "create_user")
	loginUser(input: LoginUserInput): String! @resolver(name: "login_user")
	logout: Boolean! @resolver(name: "logout")


input LogoutInput {
		allTokens: Boolean

type Mutation {
	createUser(input: CreateUserInput): User! @resolver(name: "create_user")
	loginUser(input: LoginUserInput): String! @resolver(name: "login_user")
	logoutUser(input: LogoutInput): Boolean! @resolver(name: "logout_user")

My order of events/attempts:

  • A schema where I only added the logoutUser mutation and LogoutInput input type failed to upload.

  • I removed the logout mutation, leaving the additions, and tried again. This also failed as before.

  • Then I removed my edits and attempted to just upload the schema as it was before, and that, too, failed.

But when I look at the schema docs tab in the playground I see the LogoutInput input type has been merged in.

Bringing me back to my is it prevented or interrupted? question.


@hwlmatt Instance data is not Valid indicates that your GraphQL schema is corrupted. This is not related to the documents in the Collection. I will ping you in DM as I need more details to troubleshoot your schema.

Hey @Jay-Fauna will do and thanks!
Just a note on a couple things I noticed since originally posting:

  • the schema I was attempting to upload works fine with a new DB

  • on the old DB, downloading and attempting to update using the full Fauna-generated schema gives the following, different, error:

Error updating GraphQL schema.
    Syntax error while parsing GraphQL query. Invalid input 'r', expected scalar, BlockString, OperationType, CommentCap, schema, Fragment, type or '"' (line 127, column 2):
     represents non-fractional signed whole numeric values.

Line 127, column 2 is a comment that is missing its #:

126 # The `Long` scalar type
127 represents non-fractional signed whole numeric values.
128 # Long can represent values between -(2^63) and 2^63 - 1.
129 scalar Long

Interestingly - but perhaps coincidentally - the preceding lines are the LoginUserInput and LogoutInput the attempted update was trying to add.

They are:

117 input LoginUserInput {
118  username: String!
119  password: String!
120 }
122 input LogoutInput {
123 allTokens: Boolean
124 }

This is an indication of corruption in the existing schema.

I am assuming you downloaded the SDL. If so, we do not support importing it yet.

The next release of Fauna GraphQL API will allow users to download the existing schema to compare it with the one you want to import.

I had moved on from the db with the above issues and started anew.

Once again ran into the Instance data is not valid error when Updating a schema.

I’m just adding two points onto this thread:
First, on my original question:

It appears the answer is that it is interrupted. The failed update may partially go through.
For instance, after manually removing the graphql meta data from all db objects and the db itself, and removing all existing indexes, the schema upload fails with the same error, BUT navigating away from and back to the playground shows that the schema has been imported. Indexes, however, are neither created nor updated it seems. (or not at least in my case. I recognize this could be a step at or after the issue causing the failure)

The same schema uploads without issue to a new DB, a point I’m told indicates an issue with the existing schema, which I take to mean either
a) the complete schema fauna generated, or
b) that schema after it has been affected by a partial and interrupted update

My Question:
Am I correct in this assessment that the error indicates the update was interrupted at its point of error, and that such an interruption may cause the existing schema to now be invalid (or that Fauna may have generated an invalid schema originally that is now getting caught during update)?