-
Notifications
You must be signed in to change notification settings - Fork 79
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
修正rpc调用模式下bean的selection自动展开中层次判断不一致的bug
- Loading branch information
1 parent
2c29d9e
commit cd807f8
Showing
6 changed files
with
276 additions
and
15 deletions.
There are no files selected for viewing
Empty file.
28 changes: 28 additions & 0 deletions
28
nop-auth/nop-auth-service/src/test/java/io/nop/auth/service/TestSiteMapApi.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
package io.nop.auth.service; | ||
|
||
import io.nop.api.core.annotations.autotest.EnableSnapshot; | ||
import io.nop.api.core.annotations.autotest.NopTestConfig; | ||
import io.nop.api.core.beans.ApiRequest; | ||
import io.nop.autotest.junit.JunitAutoTestCase; | ||
import io.nop.graphql.core.IGraphQLExecutionContext; | ||
import io.nop.graphql.core.engine.IGraphQLEngine; | ||
import jakarta.inject.Inject; | ||
import org.junit.jupiter.api.Test; | ||
|
||
import java.util.Map; | ||
|
||
@NopTestConfig(localDb = true) | ||
public class TestSiteMapApi extends JunitAutoTestCase { | ||
@Inject | ||
IGraphQLEngine graphQLEngine; | ||
|
||
@EnableSnapshot | ||
@Test | ||
public void testRpc(){ | ||
ApiRequest<Map<String,Object>> request = new ApiRequest<>(); | ||
// 测试children自动展开到6层 | ||
IGraphQLExecutionContext context = graphQLEngine.newRpcContext(null, | ||
"SiteMapApi__getSiteMap", request); | ||
System.out.print(context.getFieldSelection().toString()); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.