Graphql Update Schema feature broken in UI?

Hello, new to Fauna but I’ve spent hours trying to figure out why I cannot update my Schema via the Dashboard UI. Is this a known bug?

I have tried everything I can think of and everything comes back with the green success state, but nothing actually is changed.

I have tried adding a field to a collection; I have tried adding new collections.

What am I missing? Thanks.

Hi @Varius!

Can you share the first schema imported and one of the newer ones that isn’t working?

The update schema function does not actually delete any of your existing Collections, Indexes, or Functions, so parts of an old schema will stick around until you:

1 delete those Collections/Indexes/Functions manually, or
2 use Override Schema function

using Override nukes the database to start over, which is no good of course if you are trying to keep your existing data.

Hi!

I am actually, just trying to add an additional collection, but I also tried very simply adding a field to my existing collection and that didnt work either.

Override won’t work as I do have data I’d like to keep. Here is a very simple example I tested, which doesn’t work:

  1. Create collection based off tutorial sample (.gql file Imported):

type Todo {
title: String!
}

type Query {
allTodos: [Todo!]
}

This works, creates collection.

  1. Attempt to add additional collection in same manner (.gql file Imported):

type Todo {
title: String!
}

type Query {
allTodos: [Todo!]
}

type TodoX {
title: String!
}

type Query {
allTodoXs: [TodoX!]
}

Import says success - no new collection created though.

  1. Attempt to add additional field to existing Collection (.gql file Imported):

type Todo {
title: String!
newfield: String!
}

type Query {
allTodos: [Todo!]
}

Import says success - no new field created though.

Attempt #2 should absolutely not work, because you are defining type Query twice.

you should see similar to this error:

image

I’ve created a new DB and immediately uploaded the original schema, then #3 attempt. it updates correctly as expected with the new field.

Are you certain that you did not make any other previous updates to the schema before now, that would leave lingering effects in the background?

Can you create a new database, and upload your true schemas, in the same order, to that new DB, and reproduce your issue?

(As an aside, please format your schema as a code block when you post here. It will be easier to read and understand.)