Skip to content

Spring Boot and GraphQL: @Component issue #449

Answered by vojtapol
Urunov asked this question in Q&A
Discussion options

You must be logged in to vote

The exception is telling you that there is no resolver method or field called id or getId() on the Category type.

This is the POJO:

@Data
@AllArgsConstructor
@NoArgsConstructor
@Getter
@Setter
@ToString
@Entity
@Table(name = "category")
public class Category implements Serializable {
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Column(name = "ID", nullable = false, unique = true)
    private Long category_id;

    private String name;
    private String value;
    private String type;
    private String icon;
    private String slug;

    @OneToMany(cascade = CascadeType.ALL)
    @JoinColumn(name = "category_id")
    private Collection<Product> products = new Array…

Replies: 5 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by vojtapol
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #449 on December 21, 2020 15:43.