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

Valve Master Servers aren't filtered properly #106

Open
teooko opened this issue Sep 26, 2023 · 4 comments
Open

Valve Master Servers aren't filtered properly #106

teooko opened this issue Sep 26, 2023 · 4 comments
Labels
bug Something isn't working v0.5.X Things about v0.5.X
Milestone

Comments

@teooko
Copy link

teooko commented Sep 26, 2023

As i was testing the requests in the graphql playground, i noticed that the data did not match the filters.

I made a request for one server with isEmpty set to false, and then the same one with isEmpty set to true. Both of them fetched the same server.

Maintainer edit: The referenced project is SESS-Backend.

@teooko teooko added the bug Something isn't working label Sep 26, 2023
@Douile
Copy link
Collaborator

Douile commented Sep 26, 2023

Are you referring to the filters in valve master server query? The closest filter to isEmpty there is CanBeEmpty which expected behaviour would be as you described: when false shows all servers that aren't empty, when true shows all servers that are empty as well as all servers that aren't empty. If you are referring to something else could you give some more context as to how you are applying filters and what you are applying filters to please.

@teooko
Copy link
Author

teooko commented Sep 26, 2023

Yes, the filters in valve master server query.
This is the query

subscription getServers($searchGame: ServersFilters!, $howMany: Int! ) {
  servers(filters: $searchGame, limit: $howMany)
  {
    name,
    appid,
    playersOnline
  }
}

I set these as the query variables

{
  "searchGame": 
  {
    "runsAppId": 440,
    "isEmpty": true
  },
  "howMany": 30
}

And i got both empty and populated servers
image

@Douile
Copy link
Collaborator

Douile commented Sep 27, 2023

I couldn't find a graphQL playground with gamedig (I haven't used graphQL much before). What's the URL of the API you're querying for this data, or is it created using a tool that automatically generates graphQL bindings for rust?

@CosminPerRam CosminPerRam changed the title Servers aren't filtered properly Valve Master Servers aren't filtered properly Oct 2, 2023
@CosminPerRam
Copy link
Member

The mentioned project is this one: SESS-Backend (will also edit the initial message to make this clear).
There seems to be a discrepancy related to filters going to the master server and the servers that it returns as being fit for those, I will test to see if this is a common issue, if so, we would need to implement a way to query each server and filter them afterwards.

@cainthebest cainthebest added this to the Backlog milestone Sep 30, 2024
@cainthebest cainthebest added the v0.5.X Things about v0.5.X label Oct 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working v0.5.X Things about v0.5.X
Projects
None yet
Development

No branches or pull requests

4 participants