orefalo / staruml3-graphql

GraphQL extension for StarUML3
GNU General Public License v3.0
17 stars 7 forks source link

@directives modeling #2

Open blochaou opened 5 years ago

blochaou commented 5 years ago

Hi

I try to model @unique directive with this extension. I try to use tags as in the documentation but any directive is generated.

i designed:

id: ID[1] {unique}

I expected: ` type Client {

id: ID! @unique
police: String
nom: String
prenom: String

} I got: type Client {

id: ID!
police: String
nom: String
prenom: String

} `

Please any help.

orefalo commented 5 years ago

You need to use Tags or Constraints for directives

Tags are visible Constraints are not

If I recall ;-)

blochaou commented 5 years ago

Hi Thank you for your answer. I know i have to use Tags and Contraints but i don't see anywhere to define tags and contraints in StarUml as i'm new in this software. Thank

blochaou commented 5 years ago

Sorry I see tags and Constraints. It generate @unique() instead @unique Do you have any idea ? Thank you very much.

blochaou commented 5 years ago

Hi In the source code i see ` // graphql visual directives - modeled as Tags

  const _tags = elem.tags;
  if (_tags) {
    for (i = 0, len = _tags.length; i < len; i++) {
      e = _tags[i];
      terms.push(" @" + e.name + "(" + e.value + ")");
    }
  }

` It seems that there is no way to remove parenthesis from the StarUML GUI. Please confirm if i'm right. I can modify by myself

Regards

orefalo commented 5 years ago

that's right, I forgot about contraints without parameters. if you could do the change, I will gladly merge it in.

Thank you