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

GraphQL - Implement roster category #3586

Merged
merged 9 commits into from
Mar 18, 2022
Merged

Conversation

Premwoik
Copy link
Contributor

@Premwoik Premwoik commented Mar 14, 2022

This PR addresses MIM-1605 and implements roster category for both user and admin.

This implementation reuse roster commands from mod_commands (used by admin and user Rest API) and extracts those functions to the new mod_roster_api module.

There is also a service_admin_extra_roster module that delivers commands for CTL, and I tried to implement the most useful functionality in GraphQL with the use of functions proposed by Rest API. The roster functions used by extra roster commands are undocumented and seem to be older. Also, the extra roster API is a little bit different from the Rest API, so I left it unchanged.

@Premwoik Premwoik changed the base branch from master to feature/graphql March 14, 2022 08:05
@codecov
Copy link

codecov bot commented Mar 14, 2022

Codecov Report

Merging #3586 (364b321) into feature/graphql (5da0e04) will increase coverage by 0.03%.
The diff coverage is 97.56%.

@@                 Coverage Diff                 @@
##           feature/graphql    #3586      +/-   ##
===================================================
+ Coverage            81.39%   81.43%   +0.03%     
===================================================
  Files                  463      469       +6     
  Lines                33141    33265     +124     
===================================================
+ Hits                 26976    27090     +114     
- Misses                6165     6175      +10     
Impacted Files Coverage Δ
src/admin_extra/service_admin_extra_roster.erl 87.41% <ø> (ø)
src/graphql/mongoose_graphql.erl 91.11% <ø> (ø)
src/mod_roster.erl 78.75% <ø> (ø)
src/mod_commands.erl 92.59% <94.44%> (-0.21%) ⬇️
src/mod_roster_api.erl 94.73% <94.73%> (ø)
.../graphql/admin/mongoose_graphql_admin_mutation.erl 100.00% <100.00%> (ø)
src/graphql/admin/mongoose_graphql_admin_query.erl 100.00% <100.00%> (ø)
...l/admin/mongoose_graphql_roster_admin_mutation.erl 100.00% <100.00%> (ø)
...phql/admin/mongoose_graphql_roster_admin_query.erl 100.00% <100.00%> (ø)
src/graphql/mongoose_graphql_enum.erl 72.00% <100.00%> (+13.17%) ⬆️
... and 18 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 5da0e04...364b321. Read the comment docs.

@mongoose-im

This comment was marked as outdated.

@mongoose-im

This comment was marked as outdated.

@mongoose-im

This comment was marked as outdated.

@mongoose-im

This comment was marked as outdated.

@mongoose-im

This comment was marked as outdated.

@mongoose-im

This comment was marked as outdated.

@mongoose-im

This comment was marked as outdated.

@mongoose-im

This comment was marked as outdated.

@mongoose-im

This comment was marked as outdated.

@Premwoik Premwoik marked this pull request as ready for review March 15, 2022 07:21
Copy link
Member

@chrzaszcz chrzaszcz left a comment

Choose a reason for hiding this comment

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

Looks good, a huge amount of good code 👍

big_tests/tests/graphql_roster_SUITE.erl Outdated Show resolved Hide resolved
big_tests/tests/graphql_roster_SUITE.erl Show resolved Hide resolved
big_tests/tests/graphql_roster_SUITE.erl Outdated Show resolved Hide resolved
big_tests/tests/graphql_roster_SUITE.erl Outdated Show resolved Hide resolved
big_tests/tests/graphql_roster_SUITE.erl Outdated Show resolved Hide resolved
priv/graphql/schemas/global/roster.gql Outdated Show resolved Hide resolved
priv/graphql/schemas/global/roster.gql Outdated Show resolved Hide resolved
src/graphql/admin/mongoose_graphql_admin_mutation.erl Outdated Show resolved Hide resolved
src/mod_roster_api.erl Outdated Show resolved Hide resolved
priv/graphql/schemas/admin/roster.gql Outdated Show resolved Hide resolved
@mongoose-im

This comment was marked as outdated.

@mongoose-im
Copy link
Collaborator

mongoose-im commented Mar 17, 2022

small_tests_24 / small_tests / 364b321
Reports root / small


small_tests_23 / small_tests / 364b321
Reports root / small


dynamic_domains_pgsql_mnesia_23 / pgsql_mnesia / 364b321
Reports root/ big
OK: 2915 / Failed: 0 / User-skipped: 133 / Auto-skipped: 0


dynamic_domains_mysql_redis_24 / mysql_redis / 364b321
Reports root/ big
OK: 2898 / Failed: 0 / User-skipped: 150 / Auto-skipped: 0


dynamic_domains_pgsql_mnesia_24 / pgsql_mnesia / 364b321
Reports root/ big
OK: 2915 / Failed: 0 / User-skipped: 133 / Auto-skipped: 0


ldap_mnesia_23 / ldap_mnesia / 364b321
Reports root/ big
OK: 1618 / Failed: 0 / User-skipped: 427 / Auto-skipped: 0


ldap_mnesia_24 / ldap_mnesia / 364b321
Reports root/ big
OK: 1618 / Failed: 0 / User-skipped: 427 / Auto-skipped: 0


internal_mnesia_24 / internal_mnesia / 364b321
Reports root/ big
OK: 1664 / Failed: 0 / User-skipped: 381 / Auto-skipped: 0


dynamic_domains_mssql_mnesia_24 / odbc_mssql_mnesia / 364b321
Reports root/ big
OK: 2915 / Failed: 0 / User-skipped: 133 / Auto-skipped: 0


mysql_redis_24 / mysql_redis / 364b321
Reports root/ big
OK: 3284 / Failed: 0 / User-skipped: 147 / Auto-skipped: 0


elasticsearch_and_cassandra_24 / elasticsearch_and_cassandra_mnesia / 364b321
Reports root/ big
OK: 1972 / Failed: 0 / User-skipped: 382 / Auto-skipped: 0


pgsql_mnesia_23 / pgsql_mnesia / 364b321
Reports root/ big
OK: 3289 / Failed: 0 / User-skipped: 142 / Auto-skipped: 0


mssql_mnesia_24 / odbc_mssql_mnesia / 364b321
Reports root/ big
OK: 3289 / Failed: 0 / User-skipped: 142 / Auto-skipped: 0


riak_mnesia_24 / riak_mnesia / 364b321
Reports root/ big
OK: 1820 / Failed: 0 / User-skipped: 379 / Auto-skipped: 0

Copy link
Member

@chrzaszcz chrzaszcz left a comment

Choose a reason for hiding this comment

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

All looking good!

@chrzaszcz chrzaszcz merged commit d1688cf into feature/graphql Mar 18, 2022
@chrzaszcz chrzaszcz deleted the graphql/roster-api branch March 18, 2022 08:59
@chrzaszcz chrzaszcz added this to the 6.0.0 milestone Dec 12, 2022
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.

3 participants