Code Monkey home page Code Monkey logo

Comments (10)

rmosolgo avatar rmosolgo commented on June 24, 2024

Hey, sorry for the trouble and thanks for reporting this! "Archiving" was a later addition to the OperationStore, but I certainly intended to retain backwards compatibility for systems that didn't migrate or hadn't migrated yet. I'll investigate this soon, and if you want to try migrating your database in the meantime, you can find the migration notes here: https://graphql-ruby.org/operation_store/active_record_backend.html#database-update

from graphql-ruby.

tmtrademarked avatar tmtrademarked commented on June 24, 2024

Hmm - we did the migration referenced here a while ago. I can confirm that both of those columns are in the DB. But the error appears to be complaining about archived_references_count, which from what I can tell is actually just computed in a join.

So it sounds like there's nothing that jumps out obviously as a step we missed, which makes me wonder if maybe we have something else slightly unexpected in our system.

from graphql-ruby.

rmosolgo avatar rmosolgo commented on June 24, 2024

Yeah... very weird. Maybe that SUM(...) is somehow returning null instead of 0. What database are you using?

from graphql-ruby.

tmtrademarked avatar tmtrademarked commented on June 24, 2024

We're using Postgres 12.18! Sorry, should have included that earlier.

from graphql-ruby.

rmosolgo avatar rmosolgo commented on June 24, 2024

No worries, thanks. I was able to replicate this issue when GraphQLIndexReference records are missing from the database. I'm not sure how that could happen, but it's easy enough to recreate them in a Rails console:

MySchema.operation_store.reindex

I expect if you run that in a console, this view will be fixed for you.

In any case, I also released graphql-pro 1.27.2 with more graceful handling for this case, printing a message suggesting that same fix.

Could you try that fix, or try the new version, and let me know how it goes for you?

from graphql-ruby.

tmtrademarked avatar tmtrademarked commented on June 24, 2024

Hmm - MySchema.operation_store.reindex seemed to fix the backend, but that command seems to run forever. Am I missing something, or does the reindex method never actually increment current_page? It seems odd that this is an eternal loop for me, given that at least iterations should increment to 1000 and stop?

from graphql-ruby.

tmtrademarked avatar tmtrademarked commented on June 24, 2024

Hmm, I spoke prematurely - it no longer has the same error, but the index is pretty obviously incomplete. :-/

from graphql-ruby.

rmosolgo avatar rmosolgo commented on June 24, 2024

Derp... so sorry about that. I just released graphql-pro v1.27.3 with a fixed (and properly tested...) multi-page .reindex behavior. Could you try again on the new version?

from graphql-ruby.

tmtrademarked avatar tmtrademarked commented on June 24, 2024

Ah ha! That got us back in shape. Thanks a ton, @rmosolgo !

from graphql-ruby.

rmosolgo avatar rmosolgo commented on June 24, 2024

Glad to hear it. Sorry for the trouble and thanks for working through it with me!

from graphql-ruby.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.