Skip to content

[V3] GraphQL in v3 – Definitions missing, what’s the intended path? #3927

Description

@Golevka2001

🔍 Have you checked Spicetify.app page for your issue?

  • I have checked the FAQ

🔍 Is there already an issue for your problem?

  • I have checked older issues, open and closed

ℹ Environment / Computer Info

- Spotify version: macOS (Apple Silicon) 1.2.98.301.gfcaeba72
- Spicetify version: v3.0.0-beta.14

📝 Description

I had asked this question on Discord before, but didn't receive a reply, probably because it wasn't noticed. So I want to consult here again, thank you.

I was looking into the v3 runtime and noticed Spicetify.GraphQL.Definitions is an empty object. The subkeys like QueryDefinitions, MutationDefinitions, ResponseDefinitions aren’t there either.
The relevant binding is visible here:


Request, Context, and Handler all exist, but there’s nothing to pass into Request.

I checked how current extensions handle this:

  • Some do client.graphQL.Definitions.getAlbum then feed it to Request (bookmark, lyrics-plus, full-app-display). At runtime Object.keys(Definitions) is 0 so getAlbum is undefined. lyrics-plus seems to catch the failure silently and falls back to REST.
  • new-releases does Definitions?.xxx ?? { name, operation, sha256Hash, value: null }.
  • shuffle-plus hardcodes name + sha256Hash and calls Request directly. Comment says “Definitions from older Spotify version”.

So a few things I’d like to confirm:

  • Is Definitions (and its subkeys) planned to come back in v3, or is it considered deprecated
  • If it’s gone or not implemented yet, what’s the recommended approach for GraphQL in v3 extensions
  • For search specifically – v3’s Query union type only shows searchModalResults. No searchDesktop etc. Should we keep using GraphQL with self-provided definitions/hashes for search, or is the intended path something like cosmos / Platform?

Would be good to know what’s safe to rely on going forward.

📸 Screenshots

No response

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions