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

feat: added support for variables and operationName for templates #591

Merged

Conversation

peternic
Copy link
Contributor

Added support for variables and operation name to the templates graphql. This will make it possible to use codegen to generate and compiletime check queries.

So need to be able to pass in the variables and the operationName through the sdk.

@codecov
Copy link

codecov bot commented Jun 24, 2021

Codecov Report

Merging #591 (08a64d2) into master (00c73e4) will decrease coverage by 21.28%.
The diff coverage is 87.90%.

@@             Coverage Diff             @@
##           master     #591       +/-   ##
===========================================
- Coverage   98.69%   77.41%   -21.29%     
===========================================
  Files          19       89       +70     
  Lines         764     3090     +2326     
  Branches       51      394      +343     
===========================================
+ Hits          754     2392     +1638     
- Misses         10      697      +687     
- Partials        0        1        +1     
Impacted Files Coverage Δ
...able/src/api/serviceAccounts/serviceAccountsApi.ts 100.00% <ø> (ø)
...table/src/api/timeSeries/syntheticTimeSeriesApi.ts 100.00% <ø> (ø)
...ackages/stable/src/api/timeSeries/timeSeriesApi.ts 100.00% <ø> (ø)
packages/stable/src/cogniteClient.ts 100.00% <ø> (ø)
packages/stable/src/retryValidator.ts 100.00% <ø> (ø)
packages/stable/src/types.ts 100.00% <ø> (ø)
packages/template/src/__tests__/testUtils.ts 100.00% <ø> (ø)
packages/template/src/cogniteClient.ts 100.00% <ø> (ø)
packages/wells/src/__tests__/testUtils.ts 50.00% <ø> (ø)
packages/wells/src/client/api/casingsApi.ts 11.76% <ø> (ø)
... and 183 more

@peternic peternic marked this pull request as ready for review June 24, 2021 16:49
@peternic peternic requested a review from a team as a code owner June 24, 2021 16:49
@peternic peternic requested review from a team and vegardok June 24, 2021 16:49
Copy link

@stignite stignite left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚀

@peternic
Copy link
Contributor Author

After approval, is it correct that I shall merge this as blow to get it released?

feat(templates): added support for variables and operationName for templates [release]

BREAKING CHANGE: The templates runQuery function in beta has changed signature, now accepts an object with query, variables and operationName

@jarlah
Copy link
Contributor

jarlah commented Jun 25, 2021

You have degraded test coverage or test coverage is wrong. I don't see any specifically wrong with PR itself ;) Ive seen feat!(module): message floating about but I'm not sure what the ! means yet.

@peternic
Copy link
Contributor Author

You have degraded test coverage or test coverage is wrong. I don't see any specifically wrong with PR itself ;) Ive seen feat!(module): message floating about but I'm not sure what the ! means yet.

Yes, seems like it is checking against a very old commit for coverage. Not sure how to fix, any ideas?

The ! Is for breaking changes I think...

@polomani
Copy link
Collaborator

polomani commented Jun 25, 2021

@peternic BREAKING CHANGE: should work according to https://github.com/conventional-changelog/conventional-changelog/tree/master/packages/conventional-changelog-angular#angular-convention
You could also try to run lerna locally and see if it bumps the number.

We had issues with major releases previously, please reach out if you face it :)

PS. ignore codecov

@peternic peternic requested a review from begozcan June 28, 2021 07:27
@peternic peternic merged commit 19514b0 into master Jun 28, 2021
This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants