23 lines
983 B
Java

package cryptosky.me.graphql.tweets.mutations;
import com.coxautodev.graphql.tools.GraphQLMutationResolver;
import cryptosky.me.graphql.tweets.models.entities.BtcTweetModel;
import cryptosky.me.graphql.tweets.service.BtcTweetService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
@Component
public class BtcTweetMutation implements GraphQLMutationResolver {
@Autowired
BtcTweetService btcTweetService;
public BtcTweetModel createTweet(final String createdDate, final String rawTweet, final float sentimentScore,
final float positiveScore, final float neutralScore, final float negativeScore,
final float compoundScore ) {
return this.btcTweetService.createTweet( createdDate, rawTweet, sentimentScore, positiveScore, neutralScore,
negativeScore,compoundScore );
}
}