All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.demographql.helloworld.ChatMutation Maven / Gradle / Ivy

There is a newer version: 2.3.1
Show newest version
package org.demographql.helloworld;

import graphql.kickstart.tools.GraphQLMutationResolver;
import org.jetbrains.annotations.NotNull;
import org.springframework.stereotype.Component;


@Component
public class ChatMutation implements GraphQLMutationResolver {
    public @NotNull
    Chat message(@NotNull String message) {
        String reverse = new StringBuilder(message).reverse().toString();
        return Chat.builder().youSaid(message).iSay(reverse).build();
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy