Commit graph

144 commits

Author SHA1 Message Date
99e6480486 add logging to modeling
my hope is that, if we fuck things up, this will make it clear 😅
2020-10-06 07:06:19 -07:00
bb812a2b81 oops, fix bug modeling pet with no items 2020-10-06 06:38:21 -07:00
6ec6bbec57 first-time modeling UX improvements
These changes are most relevant for playing around in the dev server, modeing against an empty database. But they'll also help in real-world modeling scenarios! e.g. modeling a new species/color combo is now a bit nicer, we don't show a blank entry in the color picker
2020-10-06 06:37:51 -07:00
df2d814c13 enable running against a local dev database
had to add some missing tables, but it seems to work! (some known errors though, from assumptions we make e.g. blue acaras existing)
2020-10-06 06:18:19 -07:00
da72837d9e modeling saves item-to-asset relationships
this is the last one to get parity with current modeling, I think?? I'm gonna add one more feature though: removing no-longer-used assets from the item
2020-10-06 05:49:37 -07:00
fefb798e87 extract Pet GQL to Pet.js from Outfit.js 2020-10-06 05:04:44 -07:00
740d8415db extract modeling logic into modeling.js 2020-10-06 05:02:21 -07:00
0f5c437ffd split up modeling code into smaller functions
This is mostly because I want to chain the rels after both items and assets save, and I want to be able to specify that stuff a bit more precisely, rather than the like, layers-of-awaits we were building up.
2020-09-27 03:57:14 -07:00
a8c351b102 oops, fix a bug with Pet name GQL 2020-09-27 03:21:07 -07:00
914a06f8c7 add test for UC modeling
This got fixed in the refactor last commit, where we added the petAppearance field!
2020-09-27 03:19:10 -07:00
e57af14625 refactor Outfit.js to split Pet to a separate type
yeah, I had unified Pet into Outfit, but now I think that was overly clever… 😅

Here, I define a new Pet type, and it has some of the fields of Outfit and the deprecated fields still.

I did this because I want petAppearance to work, for UC testing!
2020-09-27 03:18:46 -07:00
94f6363251 add LIMIT 1 to our updates, out of healthy fear
This is just me thinking about what could go wrong in the modeling rollout,

this at least makes it so that, if something breaks, it will break small
2020-09-25 05:15:58 -07:00
cc5a8a6fab set bodyId=0 when item's body id changes
that is, if we see an item modeled on a second body, then treat it as body 0
2020-09-25 05:04:12 -07:00
96a126ebba oops, stop sending unnecessary inserts/updates
got the types wrong on some stuff, and got pet state sorting wrong!
2020-09-25 03:29:02 -07:00
41e70ba8d0 finish modeling full pet appearance 2020-09-25 03:29:02 -07:00
50537758c5 start test/dev db IDs at 1, not wherever prod is
We download the schema from prod, and omit real data, but I didn't notice that we were still pulling the metadata of the auto increment counter for IDs! Now, we scrub that from the schema file we save.
2020-09-25 03:29:02 -07:00
71f491ce65 modeling saves pet state 2020-09-25 03:29:01 -07:00
5332c9e265 save biology assets on model
and start in comments on pet states :)
2020-09-25 03:29:01 -07:00
ff3fc943d7 modeling saves pet type 2020-09-25 03:29:01 -07:00
9111dfddd3 save item swf assets during modeling 2020-09-25 03:29:01 -07:00
f7d9faa265 update modeled item data 2020-09-25 03:29:01 -07:00
8793d8b570 refactor modeling code a bit to use syncToDb fn 2020-09-25 03:29:01 -07:00
d27395bda2 hooray, animated items seem to be working?! ^w^ 2020-09-22 03:53:48 -07:00
1b59b9631b GQL for canonical appearance for body
gonna use this for item page! I walked back my supported species idea 😅
2020-09-21 02:56:48 -07:00
bcf6e6d8a7 add GQL to know what species can wear an item
gonna use this on the item page to seed the species choice!
2020-09-20 21:33:45 -07:00
dc785b063e remove detailed gql from honeycomb traces
This wasn't actually super helpful to read anyway, and I think it was causing us to hit rate limits.

We can maybe add back a limited version to like, add path context of _where_ a span happened in the GQL tree, but like, I feel like that's typically been pretty intuitive so far.
2020-09-19 21:34:35 -07:00
dfeeb9fe0d modeling will save new item data (but not assets)
just a first step!
2020-09-18 07:34:41 -07:00
07691a4e6b add basic test db infra
Boom, now we can also run a clean MySQL test db on each test that wants it :)

the test I wrote as a sample is currently marked `it.skip` because it's not passing yet!
2020-09-18 05:50:17 -07:00
ffeb494f45 add created at date to item page
this will help me notice which items are new! lol
2020-09-15 04:15:15 -07:00
57c0981472 ah oops, dont use syntax that prod doesn't support
right, dev supports `?.` syntax, but prod builds don't. I keep forgetting that!
2020-09-15 03:27:41 -07:00
c3c8d924b5 add other colors to modeling GQL 2020-09-15 03:06:17 -07:00
32822b250d add colors to modeling query, no change to gql yet
This updates the MySQL procedure to get the important special colors, but keeps the GQL behavior the same by only filtering to Blue. Just an incremental step before changing the behavior, to make sure I've gotten it right so far!

Snapshots significantly updated, but, from scanning it, I think that's expected changes from actual modeling progress. Hooray!
2020-09-15 02:38:23 -07:00
0b724f7509 add own/want badges to items in wardrobe 2020-09-12 20:02:56 -07:00
45ffa92f1d add itemsTheyWant to user GQL 2020-09-11 21:34:28 -07:00
c0f0e5688c include item lists in itemsTheyOwn
This adds the owned items to the user items page, and also means that owned items in lists will be tagged for the modeling page
2020-09-11 21:23:14 -07:00
5a91dd2f2a in-memory cache for modeling query
I'm using my first ever MySQL Store Procedure for clever cleverness in caching the modeling query!

I realized that checking for the latest contribution timestamp is a pretty reliable way of deciding when modeling data was last updated at all. If that timestamp hasn't changed, we can reuse the results!

I figured that, because query roundtrips are a bottleneck in this environment, I didn't want to make that query separately. So, I built a MySQL procedure to do the check on the database side!
2020-09-06 15:49:08 -07:00
f73211a50e add GQL endpoint for items that need models 2020-09-06 02:50:04 -07:00
655a7e281c remove "As a reminder" from a support notif
Oops, I meant to remove this from both PetAppearance mutation loggers, but I guess I only removed it from one!
2020-09-06 02:11:58 -07:00
3512418a66 refactor GQL typedefs/resolvers into separate files
get that giant index file broken up a bit!
2020-09-06 02:11:22 -07:00
453953dded simplify validPetPoses out of the server directory 2020-09-06 00:40:00 -07:00
Matchu
e2b5486168 GraphQL for user's itemsTheyOwn 2020-09-04 05:57:21 -07:00
dac7a682d4 oops, I broke the cached data script 2020-09-02 23:19:50 -07:00
ba004ae656 oops, fix build errors from using future syntax
worked in some local contexts, but the prod build failed!
2020-09-02 23:07:44 -07:00
12b87ee7d1 set up auth on the server + test utils 2020-09-02 23:00:16 -07:00
f3013c2956 add basic user data to GraphQL API 2020-09-02 16:09:11 -07:00
6982f00729 script to export users to auth0 2020-09-02 03:49:58 -07:00
99feddb859 fix pagination ish
Okay, we handle the new pages correctly! Still some weird bugs when you send requests near each other? Probably wise to migrate to Apollo's new way of doing this
2020-09-01 20:30:18 -07:00
a11ff1326b actual zone search support? owo 2020-09-01 20:06:54 -07:00
bf465d802e item searches by word, not phrase
Been bothered by this for a while!

My hope is that this isn't a notable marginal performance hit—we were already walking the table and doing string ops anyway, I can't imagine adding to that is actually that much of a marginal lift, when the main bottleneck was probably reads. And the perf should be identical for simple single-word queries anyway. But we'll see how it feels!
2020-09-01 17:35:41 -07:00
b7c958c39b don't restrict zones if the item is not compatible
Previously, if you switched species/color such that one of your items was no longer compatible, we _would_ still apply its zone restrictions to the visible layer set.

In this change, we fix that server-side, since I think it makes the most sense for an empty appearance to be truly empty!
2020-09-01 17:00:27 -07:00