-
Notifications
You must be signed in to change notification settings - Fork 743
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
Update to latest version of Apollo CLI #2027
Comments
I'm going to need a spec for this safelisting functionality for the new codegen also. Just something that I can convert into unit tests to confirm that the new codegen has parity here. |
I wonder if a better test for the new codegen would be to leave a CI test that downloads the tooling and generates output we can compare to. |
The output is going to be so wildly different that comparing them would be difficult. We aren’t comparing the to be the same, we are only looking for one specific piece of behavior to be correct. (Not necessarily the same, just correct behavior). Unless I’m misunderstanding something! |
The output on our end would be the raw query which gets sent to the server, with |
Correct - the operationIDs.json file is the output we'd need for comparison no? |
Ideally yes |
I still don't think that comparison to the old codegen output is the appropriate way to test this. If at some point we need to alter the expected output again because of another unforeseen problem, then the outputs are going to deviate. Unit tests should directly and exclusively test the actual behavior you expect to have, not direct parity with an unmaintained legacy system. We can revisit the conversation about that when we go to actually implement this though. |
It's not about the "old codegen" and instead about the external code that registers the queries for safelisting; that just happens to be the same CLI tooling. The operationIDs.json output is the simplest form of what we'd need for comparison, I don't think
Correct - this isn't a unit test. We'll have unit tests to ensure that
👍🏻 - I've created #2029 as a TODO so we don't miss it. |
This is to get apollographql/apollo-tooling#2473 into codegen and align with the output from
client:push
for safelisting/whitelisting operations.The text was updated successfully, but these errors were encountered: