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 - Support global types #3448

Merged
merged 2 commits into from
Dec 15, 2021
Merged

Conversation

Premwoik
Copy link
Contributor

@Premwoik Premwoik commented Dec 13, 2021

This PR addresses MIM-1559 and adds support for global types.
In addition, it moves the protected directive to a global directory and adds the JID global type.

@codecov
Copy link

codecov bot commented Dec 13, 2021

Codecov Report

Merging #3448 (41e9b91) into feature/graphql (a719db0) will increase coverage by 0.04%.
The diff coverage is 96.06%.

Impacted file tree graph

@@                 Coverage Diff                 @@
##           feature/graphql    #3448      +/-   ##
===================================================
+ Coverage            80.75%   80.80%   +0.04%     
===================================================
  Files                  423      424       +1     
  Lines                32525    32510      -15     
===================================================
+ Hits                 26267    26269       +2     
+ Misses                6258     6241      -17     
Impacted Files Coverage Δ
src/event_pusher/mod_event_pusher.erl 65.00% <ø> (-22.50%) ⬇️
src/global_distrib/mod_global_distrib.erl 85.71% <ø> (ø)
src/mam/mod_mam_meta.erl 92.39% <ø> (ø)
src/mod_auth_token.erl 82.11% <ø> (ø)
src/mod_bosh.erl 94.36% <ø> (ø)
src/mod_extdisco.erl 100.00% <ø> (ø)
src/mod_last.erl 86.56% <ø> (ø)
src/mod_muc.erl 74.77% <ø> (ø)
src/mod_muc_log.erl 78.11% <ø> (ø)
src/mod_private.erl 79.66% <ø> (ø)
... and 40 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 d35b68b...41e9b91. Read the comment docs.

@mongoose-im
Copy link
Collaborator

mongoose-im commented Dec 13, 2021

small_tests_24 / small_tests / 3b4807d
Reports root / small


small_tests_23 / small_tests / 3b4807d
Reports root / small


dynamic_domains_pgsql_mnesia_23 / pgsql_mnesia / 3b4807d
Reports root/ big
OK: 2750 / Failed: 0 / User-skipped: 186 / Auto-skipped: 0


dynamic_domains_mysql_redis_24 / mysql_redis / 3b4807d
Reports root/ big
OK: 2733 / Failed: 0 / User-skipped: 203 / Auto-skipped: 0


dynamic_domains_pgsql_mnesia_24 / pgsql_mnesia / 3b4807d
Reports root/ big
OK: 2750 / Failed: 0 / User-skipped: 186 / Auto-skipped: 0


dynamic_domains_mssql_mnesia_24 / odbc_mssql_mnesia / 3b4807d
Reports root/ big
OK: 2750 / Failed: 0 / User-skipped: 186 / Auto-skipped: 0


ldap_mnesia_24 / ldap_mnesia / 3b4807d
Reports root/ big
OK: 1526 / Failed: 0 / User-skipped: 386 / Auto-skipped: 0


ldap_mnesia_23 / ldap_mnesia / 3b4807d
Reports root/ big
OK: 1526 / Failed: 0 / User-skipped: 386 / Auto-skipped: 0


internal_mnesia_24 / internal_mnesia / 3b4807d
Reports root/ big
OK: 1611 / Failed: 0 / User-skipped: 301 / Auto-skipped: 0


pgsql_mnesia_24 / pgsql_mnesia / 3b4807d
Reports root/ big
OK: 3137 / Failed: 0 / User-skipped: 195 / Auto-skipped: 0


elasticsearch_and_cassandra_24 / elasticsearch_and_cassandra_mnesia / 3b4807d
Reports root/ big
OK: 1904 / Failed: 0 / User-skipped: 313 / Auto-skipped: 0


pgsql_mnesia_23 / pgsql_mnesia / 3b4807d
Reports root/ big
OK: 3137 / Failed: 0 / User-skipped: 195 / Auto-skipped: 0


mssql_mnesia_24 / odbc_mssql_mnesia / 3b4807d
Reports root/ big
OK: 3137 / Failed: 0 / User-skipped: 195 / Auto-skipped: 0


mysql_redis_24 / mysql_redis / 3b4807d
Reports root/ big
OK: 3132 / Failed: 0 / User-skipped: 200 / Auto-skipped: 0


riak_mnesia_24 / riak_mnesia / 3b4807d
Reports root/ big
OK: 1778 / Failed: 1 / User-skipped: 314 / Auto-skipped: 0

sm_SUITE:parallel:messages_are_properly_flushed_during_resumption_p1_fsm_old
{error,
  {{badmatch,
     {error,
       {connection_step_failed,
         {#Fun<sm_SUITE.11.68776247>,
          {client,
            <<"alicE_messages_are_properly_flushed_during_resumption_p1_fsm_old_1566@localhost">>,
            escalus_tcp,<0.23159.1>,undefined,
            [{username,
               <<"alicE_messages_are_properly_flushed_during_resumption_p1_fsm_old_1566">>},
             {server,<<"localhost">>},
             {password,<<"matygrysa">>},
             {stream_management,true},
             {host,<<"localhost">>},
             {stream_id,<<"dc32e0e853711da9">>}]},
          [{compression,[<<"zlib">>]},
           {starttls,true},
           {stream_management,true},
           {advanced_message_processing,true},
           {client_state_indication,false},
           {sasl_mechanisms,[<<"SCRAM-SHA-256">>,<<"PLAIN">>]},
           {caps,undefined}]},
         {timeout,get_resumed}}}},
   [{sm_SUITE,
      '-messages_are_properly_flushed_during_resumption_p1_fsm_old/1-fun-1-',
      3,
      [{file,"/home/circleci/project/big_tests/tests/sm_SUITE.erl"},
       {line,1270}]},
    {escalus_story,story,4,
      [{file,
         "/home/circleci/project/big_tests/_build/default/lib/escalus/src/escalus_story.erl"},
       {line,72}]},
    {test_server,ts_tc,3,[{file,"test_server.erl"},{line,1783}]},
    {test_server,run_test_case_eval1,6,
      [{file,"test_server.erl"},{line,1292}]},
    {test_server,run_test_case_eval,9,
      [{file,"test_server.erl"},{line,1...

Report log

@Premwoik Premwoik marked this pull request as ready for review December 13, 2021 09:35
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 in general, I have a few comments.

src/mongoose_graphql.erl Show resolved Hide resolved
test/mongoose_graphql_SUITE.erl Outdated Show resolved Hide resolved
@mongoose-im
Copy link
Collaborator

mongoose-im commented Dec 15, 2021

small_tests_24 / small_tests / 41e9b91
Reports root / small


small_tests_23 / small_tests / 41e9b91
Reports root / small


dynamic_domains_pgsql_mnesia_24 / pgsql_mnesia / 41e9b91
Reports root/ big
OK: 2750 / Failed: 0 / User-skipped: 186 / Auto-skipped: 0


dynamic_domains_mysql_redis_24 / mysql_redis / 41e9b91
Reports root/ big
OK: 2733 / Failed: 0 / User-skipped: 203 / Auto-skipped: 0


dynamic_domains_pgsql_mnesia_23 / pgsql_mnesia / 41e9b91
Reports root/ big
OK: 2750 / Failed: 0 / User-skipped: 186 / Auto-skipped: 0


dynamic_domains_mssql_mnesia_24 / odbc_mssql_mnesia / 41e9b91
Reports root/ big
OK: 2750 / Failed: 0 / User-skipped: 186 / Auto-skipped: 0


ldap_mnesia_23 / ldap_mnesia / 41e9b91
Reports root/ big
OK: 1526 / Failed: 0 / User-skipped: 386 / Auto-skipped: 0


internal_mnesia_24 / internal_mnesia / 41e9b91
Reports root/ big
OK: 1611 / Failed: 0 / User-skipped: 301 / Auto-skipped: 0


ldap_mnesia_24 / ldap_mnesia / 41e9b91
Reports root/ big
OK: 1526 / Failed: 0 / User-skipped: 386 / Auto-skipped: 0


elasticsearch_and_cassandra_24 / elasticsearch_and_cassandra_mnesia / 41e9b91
Reports root/ big
OK: 1904 / Failed: 0 / User-skipped: 313 / Auto-skipped: 0


pgsql_mnesia_23 / pgsql_mnesia / 41e9b91
Reports root/ big
OK: 3137 / Failed: 0 / User-skipped: 195 / Auto-skipped: 0


mysql_redis_24 / mysql_redis / 41e9b91
Reports root/ big
OK: 3132 / Failed: 0 / User-skipped: 200 / Auto-skipped: 0


pgsql_mnesia_24 / pgsql_mnesia / 41e9b91
Reports root/ big
OK: 3137 / Failed: 0 / User-skipped: 195 / Auto-skipped: 0


mssql_mnesia_24 / odbc_mssql_mnesia / 41e9b91
Reports root/ big
OK: 3148 / Failed: 1 / User-skipped: 195 / Auto-skipped: 0

pep_SUITE:pep_tests:unsubscribe_after_presence_unsubscription
{error,
  {{badmatch,
     [{xmlel,<<"message">>,
        [{<<"from">>,
        <<"alice_unsubscribe_after_presence_unsubscription_1862@localhost">>},
         {<<"to">>,
        <<"bob_unsubscribe_after_presence_unsubscription_1862@localhost/res1">>},
         {<<"type">>,<<"headline">>}],
        [{xmlel,<<"event">>,
           [{<<"xmlns">>,
           <<"http://jabber.org/protocol/pubsub#event">>}],
           [{xmlel,<<"items">>,
            [{<<"node">>,<<"kBhla99rutLjH2QZ5UHxFA==">>}],
            [{xmlel,<<"item">>,
               [{<<"id">>,<<"salmon">>}],
               [{xmlel,<<"entry">>,
                  [{<<"xmlns">>,
                  <<"http://www.w3.org/2005/Atom">>}],
                  []}]}]}]},
         {xmlel,<<"headers">>,
           [{<<"xmlns">>,<<"http://jabber.org/protocol/shim">>}],
           []}]}]},
   [{pep_SUITE,'-unsubscribe_after_presence_unsubscription/1-fun-0-',2,
      [{file,"/home/circleci/project/big_tests/tests/pep_SUITE.erl"},
       {line,384}]},
    {escalus_story,story,4,
      [{file,
         "/home/circleci/project/big_tests/_build/default/lib/escalus/src/escalus_story.erl"},
       {line,72}]},
    {test_server,ts_tc,3,[{file,"test_server.erl"},{line,1783}]},
    {test_server,run_test_case_eval1,6,
      [{file,"test_server.erl"},{line,1292}]},
    {test_server,run_test_case_eval,9,
      [{file,"test_server.erl"},{line,1224}]}]}}

Report log


riak_mnesia_24 / riak_mnesia / 41e9b91
Reports root/ big
OK: 1750 / Failed: 0 / User-skipped: 314 / Auto-skipped: 0

@Premwoik Premwoik requested a review from chrzaszcz December 15, 2021 08:11
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.

Good!

@chrzaszcz chrzaszcz merged commit 22b483c into feature/graphql Dec 15, 2021
@chrzaszcz chrzaszcz deleted the graphql/support-global-types branch December 15, 2021 09:43
@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
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants