STEP-4 Simple GraphQl and Resolver

The next few steps not going to be so visual, but very important, we going to create an Extension and establish the connection (communication) between this extension and our module.

STEP-4arrow-up-right

In this particular step, we going to create a sample graphql shema and resolver.

  1. Create schema.graphqls in <MODULE ROOT>/etc/

2. Create Model folder in <MODULE ROOT> and Resolver folder in it. 3. Create SocialShare.php in <MODULE ROOT>/Model/Resolver

4. run cache:flush

5. Open GraphQl Client, for example, Altair GraphQL Clientarrow-up-right execute a query and check if you created resolver is responding

useful materials: GraphQl queriesarrow-up-right, Working with GraphQLarrow-up-right

Last updated