Dismiss Notice
Wynncraft, the Minecraft MMORPG. Play it now on your Minecraft client at (IP): play.wynncraft.com. No mods required! Click here for more info...
Dismiss Notice
Have some great ideas for Wynncraft? Join the official CT (content team) and help us make quests, builds, cinematics and much more!

Website & Forums Graphql Api For Mobile Applications And Discord / Teamspeak Bots

Discussion in 'General Suggestions' started by SwearingRoomba, Dec 23, 2019.

Thread Status:
Not open for further replies.
  1. SwearingRoomba

    SwearingRoomba Well-Known Adventurer

    Messages:
    11
    Likes Received:
    5
    Trophy Points:
    46
    Guild:
    Minecraft:
    Hello dear Wynncraft Community,

    If you're not a technican this post wont be relevant to you

    as some of you may know Wynncraft has an own API. So far so good but sadly it's a Rest Api.
    so if you're going to need data from Wynncraft you're sending a request to the Api and so on and so on.
    the problem is on mobile devices or if you have a limited connection you will may have lag or slow response times. Facebook invented GraphQL which allows to request just the data you need instead of a lot information you wont need for certain purposes. Also you will just need one endpoint and it will decrease the traffic that actually hits the wynncraft servers around the holyday session for example.
    However since GraphQL is free and OpenSource it wont need much money or time to implement the changes and it will also be much more effective and it will also lower the cost for server renting I guess.
     
    huge6446 likes this.
  2. Druser

    Druser ele defs don't matter HERO Featured Wynncraftian

    Messages:
    5,887
    Likes Received:
    11,469
    Trophy Points:
    217
    Guild:
    Minecraft:
    Why would you be sending regular API requests from a mobile device?
     
  3. SwearingRoomba

    SwearingRoomba Well-Known Adventurer

    Messages:
    11
    Likes Received:
    5
    Trophy Points:
    46
    Guild:
    Minecraft:
    If you need or want actual data like really actual it is probably the fastest solution after my knowledge
     
  4. Dream

    Dream Hero of the lost atoll Trial-Mod CHAMPION

    Messages:
    630
    Likes Received:
    1,432
    Trophy Points:
    148
    Guild:
    Minecraft:
    Don't use anything facebook makes unless you want to get your phone tapped by nasa
     
  5. SwearingRoomba

    SwearingRoomba Well-Known Adventurer

    Messages:
    11
    Likes Received:
    5
    Trophy Points:
    46
    Guild:
    Minecraft:
    It is an opensource software that means you can read every line and character of the source code of GraphQL so basically if facebook would spy on you you would be able to see it reading the sourcecode

    That's also why I said this posting/thread will be only relevant to technicians to avoid endless discussions without sense / unrelated or explained questions and or issues
    Also, its community maintained so yeah you can be sure that stuff won't spy on you in the first place, till now the Wynncraft API has no authentification or authorization, I could legitly request most parts of your in-game data and nobody would mind. But that's another topic and I suggest to open another thread for this topic or security as it.
    https://graphql.org/
     
  6. _Bedo_

    _Bedo_ Well-Known Adventurer HERO

    Messages:
    5
    Likes Received:
    2
    Trophy Points:
    47
    Minecraft:
    Personally I don't think there's too much of a need for it - the vast majority of the Wynncraft API is static and should be cached clientside anyway (off the top of my head the only pages that can't be cached are guild stats, guild list, leaderboards, player, search, server sum/list and depending on your use-case territory). Even the requests that can't be cached have data that is relevant for hours, if not days (with the obvious exception of territory). The only thing I will say is some way to determine if fresh static data is available would be nice (like a version header on the request for use with a HEAD request or a separate version endpoint). This is obviously not to say more options wouldn't be nice - I'm just not sure if the extra work is worth it compared to adding more features to the current REST API (including updating all the remaining V1 routes to V2).

    Also, this is probably not the place for this suggestion, you should use the Wynncraft API Github.
     
  7. SwearingRoomba

    SwearingRoomba Well-Known Adventurer

    Messages:
    11
    Likes Received:
    5
    Trophy Points:
    46
    Guild:
    Minecraft:
    Yes, you're right it should be cached clientside but even then you have to request data in terms and if you just need one string why should you request hundred different ones? The point of graphql is savin traffic
     
Thread Status:
Not open for further replies.