ballerina-platform / ballerina-library

The Ballerina Library
https://ballerina.io/learn/api-docs/ballerina/
Apache License 2.0
136 stars 64 forks source link

Introduce a compile-time error when a stub entity contributes additional fields to a subgraph #4816

Open MohamedSabthar opened 1 year ago

MohamedSabthar commented 1 year ago

Description: A stub entity should exclusively contain key fields; in other words, a stub entity that lacks a resolved reference should not include any fields in its type except for the key fields.

For instance, the following is a valid definition of a stub entity:

@subgraph:Entity {
    key: "id"
}
public type Product record {
    readonly string id;
};

However, the following is not valid:

@subgraph:Entity {
    key: "id"
}
public type Product record {
    readonly string id;
    string name; // 'name' is not a key
};

Describe your problem(s)

Describe your solution(s)

Related Issues (optional):

Suggested Labels (optional):

Suggested Assignees (optional):

Abhi132004 commented 1 year ago

Hii Ballerina team, I would like to work on this issue

priyavratamohan commented 1 year ago

Hi @MohamedSabthar, I'd like to work on this issue

MohamedSabthar commented 1 year ago

Hi @priyavratamohan, it appears that we've already assigned this issue to @Abhi132004. @Abhi132004 have you started working on this issue?

priyavratamohan commented 1 year ago

@MohamedSabthar, if they are unresponsive, could you assign this issue to me, as the Hacktoberfest is about to end soon.

MohamedSabthar commented 1 year ago

@MohamedSabthar, if they are unresponsive, could you assign this issue to me, as the Hacktoberfest is about to end soon.

@priyavratamohan, I have transferred this issue to you. You can start working on this.

aashish-g03 commented 1 month ago

Hi @MohamedSabthar, I noticed that the issue isn't marked as high priority. If it's not an urgent requirement, could you please assign it to me? I'm still familiarizing myself with open source contributions and would love to take this on. In case I encounter any difficulties, I’ll be sure to let you know so we can reassign if needed.

MohamedSabthar commented 1 month ago

Hi @aashish-g03,

I have assigned this issue to you.

To help you get started, here are some essential resources:

  1. Understanding Ballerina Platform: Learn what Ballerina is all about: Ballerina Platform
  2. How to Contribute: Read our contributing guidelines to understand how you can contribute effectively: Contribution Guide
  3. Contributing to the Ballerina library: If you're interested in contributing to our library, here are the guidelines: Library Contribution Guide
  4. Learn Ballerina: If you're new to Ballerina or want to enhance your skills, our official website offers a wealth of learning resources: Learn Ballerina
  5. Get Help and Connect: Ask technical questions on Stack Overflow with with Ballerina tag and join our Discord community Ballerina Discord
Yashwanth-Chandrakumar commented 2 weeks ago

Hi @MohamedSabthar looks like there is no fix for last 2 weeks. can you assign it to me

MohamedSabthar commented 2 weeks ago

@aashish-g03, Are you still working on this ?

Codewithsumeet commented 2 weeks ago

Hii Ballerina team, I would like to work on this issue

MohamedSabthar commented 2 weeks ago

Hi @Yashwanth-Chandrakumar, it seems there has been no response from the previous contributor. Would you still like to take on this issue?