Commit graph

52 commits

Author SHA1 Message Date
6821c2b734 Support tool: Remove layer from item
Heck yeah, let's clean these fuckers up!
2020-08-20 21:40:05 -07:00
47d22ad25c Build cached zones, stop querying on server
In this change, we cache the zones table as part of the JS build process. This keeps the database as our source of truth, while aggressively caching the data at deploy time.

See the new README for some rationale!

I tested this by pulling up dev Honeycomb, and observing that we no longer run db queries to `zones` in the new traces for the wardrobe page. (It's a good thing we did it this way, because I noticed some code in the server that was still loading the zone anyway, and fixed it here!)
2020-08-19 17:50:05 -07:00
4977f1ee54 Revert "cache zone data"
This reverts commit 0f7ab9d10e.

The Production Vercel deploys don't seem to like how I did this build trick, even though the Preview deploys seem fine with it 🤔 Reverting for now, sent a message to Vercel support.
2020-08-17 18:49:37 -07:00
a3423cd6d6 cache asset manifests in the db
Here's just some simple caching: we try to load the asset manifest from the db with the rest of the asset. If it's not present, we load it via HTTP, and write it to the database.

I might try to do a bulk write of manifests at some point, too.

This is because I noticed that one of the main bottlenecks in most of the endpoints now (and definitely the highest-variance) was loading from images.neopets.com.

Another approach I considered was HTTP/2 to load the manifests, because it kinda looks like the server is refusing to open all these sockets at once and effectively does the requests in waves? But images.neopets.com doesn't support HTTP/2 right now anyway, so oh well! (And that would have probably cut us down to ~250ms of HTTP time still, instead of ~600–700. Also, why is network out of Vercel so slow? :p)
2020-08-17 17:50:01 -07:00
0f7ab9d10e cache zone data
I noticed that, while looking up zone data from the db is near instant when you're on the same box, it's like 300ms here!

In this change, we start downloading zone data into the build process. That way, we can have a very fast and practically-up-to-date cache (I'm not sure I've changed it in many years), while being confident that it's in sync with the database source of truth (for things like join queries).
2020-08-17 15:28:05 -07:00
6fc508589a don't do Honeycomb in test env 2020-08-17 01:27:05 -07:00
f7997b4dc9 some Honeycomb fixes
We got bit by the "can't run anything after the response finishes" thing

so I'm just forcing the response to wait for Honeycomb submit to finish

I hope this isn't like, just awful for perf lol. but puts to honeycomb seem fast?
2020-08-17 01:16:35 -07:00
ce028e4956 add Honeycomb logging
This will let me see traces for stuff!
2020-08-16 23:28:41 -07:00
aa6ce12bbe add Neopets ID to layer support modal 2020-08-14 22:09:52 -07:00
380cbf543b add mutation to set item explicitly body specific
now that Support feature works!
2020-08-14 22:01:27 -07:00
02c959a837 add explicitlyBodySpecific to Item GQL
for the upcoming Support feature!
2020-08-14 21:12:13 -07:00
fce51875d9 add SWF to layer assets in Support tools 2020-08-01 22:54:30 -07:00
8fdc986ee9 can submit the actual body ID Support mutation!
it seems to actually be changing the things correctly aaaa
2020-08-01 15:30:26 -07:00
213f30b2f2 sketched out the pet compatibility chooser
can't actually set things properly yet, but you can scroll through options and see how it fits!
2020-08-01 14:12:57 -07:00
0a9d736957 special color mutation actually working!
Note that there's a bug when switching back to the null case… when I look in the Apollo dev tools, it's definitely getting set in the cache correctly at the right time… but the query isn't updating for some reason? I'm hoping it's an Apollo bug that will fix itself someday with an upgrade!
2020-08-01 00:10:12 -07:00
2eb1c9b780 show the actual manual special color in support UI 2020-07-31 23:33:12 -07:00
f747bfb004 load special colors into support UI 2020-07-31 23:33:12 -07:00
ffde7172de enable HTTP caching for pet appearances 2020-07-22 23:08:28 -07:00
ac12f6bb55 oops, fix isNc and stop loading items early! 2020-07-02 20:06:04 -07:00
4c78abee96 fix bug resolving item fields under pet outfit 2020-07-02 14:33:47 -07:00
Matt Dunn-Rankin
ade563ddcd server can read outfit data 2020-06-24 19:05:07 -07:00
Matt Dunn-Rankin
03cde98eae fix bug querying depth on restricted zones 2020-05-31 16:08:17 -07:00
Matt Dunn-Rankin
ce81543957 add rarityIndex, isNc to API 2020-05-31 15:56:40 -07:00
Matt Dunn-Rankin
6f5e03da9c trim item search queries 2020-05-31 15:52:54 -07:00
Matt Dunn-Rankin
fb8ccee797 skip non-SWF (music) assets 2020-05-27 00:47:13 -07:00
Matt Dunn-Rankin
29b9fe48c5 use PetService to determine the correct pose 2020-05-23 13:55:59 -07:00
Matt Dunn-Rankin
75a0fe2e8c refactor e/gp pairs to pose enum 2020-05-23 12:47:06 -07:00
Matt Dunn-Rankin
4d6a6faf4c compact the svg logs 2020-05-23 11:32:05 -07:00
Matt Dunn-Rankin
9c8a48a325 http caching for all color/species requests 2020-05-14 15:51:08 -07:00
Matt Dunn-Rankin
e18aba17c6 add svgUrl for image layers 2020-05-11 21:19:34 -07:00
Matt Dunn-Rankin
da0398b50b use bodyId, not speciesId, for pose transforms 2020-05-03 12:55:37 -07:00
Matt Dunn-Rankin
1bf33c14db use compressed validPetPoses to save network
it also has valid emotion/gp data in there too, which we'll use later!
2020-05-03 01:52:39 -07:00
Matt Dunn-Rankin
f828686ac5 cache PetAppearance for quick pose switches 2020-05-02 22:37:52 -07:00
Matt Dunn-Rankin
6e1e0a5c0b show updated pet appearance in outfit preview! 2020-05-02 22:32:08 -07:00
Matt Dunn-Rankin
d9b447bbb4 omit glitched pet states, add IDs 2020-05-02 20:48:32 -07:00
Matt Dunn-Rankin
7dc01a6feb get multiple pet poses, gender/emotion data 2020-05-02 16:49:57 -07:00
Matt Dunn-Rankin
d2e530e1a0 add item descriptions; refactor to full snapshots 2020-04-25 22:40:28 -07:00
Matt Dunn-Rankin
90ad9feb0c move neopets.com loading into server
the client stuff worked locally, but not in prod because you can't request http from https, even with cors set up correctly 😅
2020-04-25 06:50:34 -07:00
Matt Dunn-Rankin
77568c7a2f graceful handling of items that don't fit the pet 2020-04-25 04:38:55 -07:00
Matt Dunn-Rankin
564cdef0ce species/color picker! 2020-04-25 04:33:05 -07:00
Matt Dunn-Rankin
d13420256c add species/color GQL queries 2020-04-25 03:42:05 -07:00
Matt Dunn-Rankin
5e3071db4f search infinite scroll! 2020-04-25 01:55:48 -07:00
Matt Dunn-Rankin
8b8d67e5b1 restrict search results to items that fit! 2020-04-25 00:43:01 -07:00
Matt Dunn-Rankin
66c6998c58 add support for cross-origin image requests
This is setup for exporting the image view!
2020-04-24 21:38:18 -07:00
Matt Dunn-Rankin
eac6b308cd Item search frontend + backend! 2020-04-24 21:18:44 -07:00
Matt Dunn-Rankin
a076c1835a add restricted zone support 2020-04-23 14:44:06 -07:00
Matt Dunn-Rankin
dd5a7f9242 added pet appearance queries, using in frontend 2020-04-23 14:23:46 -07:00
Matt Dunn-Rankin
5028c39ea9 set default graphql endpoint in playground 2020-04-23 01:12:52 -07:00
Matt Dunn-Rankin
ff8327981f enable playground in production :) 2020-04-23 01:09:17 -07:00
Matt Dunn-Rankin
4a61919649 add GQL support for appearance data! 2020-04-23 01:09:06 -07:00