Are you wanting to use @field
, for example? It can be just any class, with any namespace. Just be sure to explicit it. For example, in app/Graphql/UserPostsResolver.php
you can have a class with a handle
function. So in your schema you would use posts: [Post!] @field(resolver: "App\Graphql\UserPostsResolver@handle")
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…